Is there a way under cfmx to retrieve the name of the template that
calls a custom tag? I've tried this, which works although it seems
inelegant.

<cftry>
        <cfthrow>
        <cfcatch>
                <cfif arrayLen(cfcatch.tagcontext) gt 1>
                        <cfset parentTemplate =
cfcatch.tagcontext[2].template>
                <cfelse>
                        <cfset parentTemplate = "">
                </cfif>
        </cfcatch>
</cftry>

<cfoutput>The template that called this tag was:
#parentTemplate#</cfoutput>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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

Reply via email to