Last active
July 31, 2025 23:52
-
-
Save JamoCA/8bb3ea051f9c87564107337c3e5d1f49 to your computer and use it in GitHub Desktop.
Check current template invocation mechanics (include vs module)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- | |
7/31/2025 | |
Related to Adobe Tracker bug report CF-4227330 (https://tracker.adobe.com/#/view/CF-4227330) | |
---> | |
<!--- Add this check to the top of the script in case it's called using cfscript | |
or it will be executed twice as "self-closing cfscript" doesn't appear to be supported. ---> | |
<cfif isdefined("thisTag.executionMode") && thisTag.executionMode eq "end"> | |
<cfexit> | |
</cfif> | |
<cfif isdefined("thisTag.executionMode")> | |
<p>This script is being called as a CFModule (and not as a CFInclude).</p> | |
</cfif> | |
<cfoutput> | |
<p>getCurrentTemplatePath() = #getCurrentTemplatePath()#<p> | |
</cfoutput> | |
<cfset callStack = callStackGet()> | |
<cfdump var="#callStack#" label="callStack"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment