----- Original Message -----
> I would like to grab the name of the included template that is
> processing when an error occurs. I can't find a way to do this other
> than by brute force by setting a variable I call
> 'variables.thisTemplate' at the top of every template, then I have to
> reset it after each include.
You want to have a look at the CF Function GetCurrentTemplatePath(). It will
grab the path and name of the template that the function is run on. I wrote
a custom tag to grab the name of all the templates used in a specific
fuseaction for debugging. It would collect all the template names and
return them to me in the order of execution.
The syntax (as I remember it) to get the template name was the code below:
<!--- //
Strip out all the directory info from the template
path and return the template name
--->
cfset template_name = ListLast(GetCurrentTemplatePath() "/")
Hope this helps.
: David Nesbitt
: Web Developer (ColdFusion)
: Ottawa, ON Canada
: (e) [EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists