GetCurrentTemplatePath

Description

Returns the fully specified path of the template that contains the call to this function.

Category

System functions

Syntax

GetCurrentTemplatePath() 

See also

GetBaseTemplatePath, FileExists, ExpandPath

Usage

This function differs from GetBaseTemplatePath in that it returns the template path of an included template, if the call is made from a template included with a cfinclude tag; GetBaseTemplatePath returns the template path of the top-level template, even if GetBaseTemplatePath is called from an included template.

Example

<!--- This example uses GetCurrentTemplatePath to show the template
path of the current page --->
<html>
<head>
<title>
GetCurrentTemplatePath Example
</title>
</head>

<body>
<H3>GetCurrentTemplatePath Example</H3>

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

</body>
</html> 

LiveDocs comments are not longer enabled for ColdFusion 5.0. Please use one of the following resources instead.

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

Version 5.0