View comments | RSS feed

GetBaseTemplatePath

Description

Gets the absolute path of an application's base page.

Returns

The absolute path of the application base page, as a string.

Category

Other functions, System functions

Function syntax

GetBaseTemplatePath()

See also

GetCurrentTemplatePath, FileExists, ExpandPath

Example

<h3>GetBaseTemplatePath Example</h3>

<p>The template path of the current page is:
<cfoutput>#GetBaseTemplatePath()#</cfoutput>

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | KnowledgeBase | Bug Reporting

Version 7

Comments


jamie jackson said on Apr 12, 2005 at 12:55 PM :
This description is little more than a rephrasing of the function name itself. It might be apparent to others, but could I have solid definition of "base page," please?

Thanks!
Jamie
jrunrandy said on Apr 19, 2005 at 10:42 AM :
I think that "base page" means the page that was initially invoked by the user. For example, you might use getbasetemplatepath() in a custom tag to determine the directory that contains the originally called page.
jackomania said on May 24, 2006 at 1:19 PM :
It's exceptionally useful when dynamically locating your physical local server's directory in reference to your component/cfm that is being accessed.

GetDirectoryFromPath(GetBaseTemplatePath())

will return something like

/opt/cfmx7/wwwroot/appName/
-or-
c:\CFusion7\wwwroot\appName\

(depending on how you've setup your directory structure)

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/7/htmldocs/00000472.htm