View comments | RSS feed

GetCurrentTemplatePath

Description

Gets the path of the page that calls this function.

Returns

The absolute path of the page that contains the call to this function, as a string.

Category

System functions

Function syntax

GetCurrentTemplatePath()

See also

GetBaseTemplatePath, FileExists, ExpandPath

Usage

If the function call is made from a page included with a cfinclude tag, this function returns the page path of an included page. Contrast this with the GetBaseTemplatePath function, which returns the path of the top-level page, even if it is called from an included page.

Example

<!--- This example uses GetCurrentTemplatePath to show the 
template path of the current page ---> <h3>GetCurrentTemplatePath Example</h3> <p>The template path of the current page is: <cfoutput>#GetCurrentTemplatePath()#</cfoutput>

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

Version 7

Comments


xdeleon said on Mar 31, 2008 at 10:05 AM :
Previous to CF8, I don't think this applied to Custom Tags. Now it does. Use GetBaseTemplatePath() if you were using this previously.

 

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/00000475.htm