That's a nasty problem, because the Application.cfm file might not be in the same directory as the base template, because CF looks up the directory tree until it finds one. I think you'll want to start with cgi.script_name and getBaseTemplatePath() in your base template. The compute the part of the full path that'd different from the script_name, and then compare that to the response getCurrentTemplatePath(), and see what's different. Then you can apply those differences to cgi.script_name to compute the URL to Application.cfm. That assumes that if you call getBaseTemplatePath() from Application.cfm, that it will return the template path of the actual requested page, but that might not be the case.
barneyb > -----Original Message----- > From: Smith, Matthew P -CONT(DYN) [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 21, 2003 11:33 AM > To: CF-Talk > Subject: easy path question > > > I'd like to have an expression in Application.cfm that tells me > the path to > the current site, basically the web path to the directory > Appication.cfm is > in. > > So if we are in c:\interpub\wwwroot\subSite\Application.cfm > > And I call > > http://myserver.com/subSite/subdirectory/subsubDirectory/page.cfm > <http://myserver.com/subSite/subdirectory/subsubDirectory/page.cfm> > > I would have a var available in Application.cfm that resolves to: > > /subSite/ > > Hmm, seemed simple but I'm not explaining it well... Basically > the web path > to Application.cfm, so I can set it to a var and append it like: > > #sitePath#subdirectory/subsubDirectory/page.cfm > > As the site may be moved to different directories. > > I know it's doable but mixing all the getBaseTemplateScriptNamePath > functions gets tricky for me. > > Thanks! > > Matthew P. Smith > Web Developer, Object Oriented > Naval Education & Training Professional > Development & Technology Center > (NETPDTC) > (850)452-1001 ext. 1245 > [EMAIL PROTECTED] > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

