Ohh,
Remove the Expand Path off those. <cfset Application.AppPath = 'C:\AppPath\' /> <cfset Application.AppPath = '\BaseAppPath\#application.name#\' /> Regards Dale Fraser <http://dale.fraser.id.au/blog/> http://dale.fraser.id.au/blog/ _____ From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dale Fraser Sent: Thursday, 8 March 2007 8:44 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: application.cfc and currentTemplatePath Andrew, That method is prone to errors if your site has multiple directories and users book mark directories, rare but if 1. The application restarts (server or cf) 2. The next user that logs in does so from a directory bookmark Since applications don't move generally <cfset Application.AppPath = ExpandPath('C:\AppPath\') /> In onApplicationStart is safer and fail safe. If you don't like hard coding and you have some standard naming of directories you can go with something like <cfset Application.AppPath = ExpandPath('\BaseAppPath\#application.name#\') /> Regards Dale Fraser <http://dale.fraser.id.au/blog/> http://dale.fraser.id.au/blog/ _____ From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Scott Sent: Thursday, 8 March 2007 7:36 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: application.cfc and currentTemplatePath Actually now you dont need to do that either. First of, the extended application should never change the application name, so in your case that is what I am going to assume. Secondly the onApplicationStart will on be fired the once, hence when you place the setting of that variable you can do this. <cfset Application.AppPath = ExpandPath('.') /> Now you can be safe and cflock that if you want to be sure, but that's all you really need to do. Regards, Andrew Scott On 3/8/07, AJ Mercer <[EMAIL PROTECTED]> wrote: try this function GetBaseTemplatePath() On 3/8/07, Taco Fleur <[EMAIL PROTECTED] > wrote: Hi all, I'm using one main application.cfc in the main folder (CFMX7) and am extending that cfc in sub folders, the main cfc has the function currentTemplatePath in it, but when called through an extended cfc it gives the path of the extended cfc while I need the one in the main directory. anyone know of a solution to this other than hard coding the root path? Thanks in advance. -- Taco Fleur - http://www.pacificfox.com.au <http://www.pacificfox.com.au/> Web Design, Web development, Graphic Design and Complete Internet Solutions an industry leader with commercial IT experience since 1994 . -- If you are not living on the edge, You are taking up too much space. www.aegeon.com.au Phone: +613 8676 4223 Mobile: 0404 998 273 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---