Last active
November 10, 2025 19:21
-
-
Save JamoCA/b67c776d31e9a5c20b63e3a2f72a152e to your computer and use it in GitHub Desktop.
Revisions
-
JamoCA revised this gist
Nov 10, 2025 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -39,6 +39,10 @@ Call this as a custom tag using a CFTag or cfscript <cfdump var="#isdefined('t.executionMode')#"> <cfdump var="#isdefined('t.hasEndTag')#"> <h2>WORKAROUND: Using TRY/Catch to capture "thisTag.executionMode" value.</h2> <cftry><cfset tagMode = thisTag.executionMode><cfcatch><cfset tagMode = ""></cfcatch></cftry> <cfdump var="#tagMode#"> <cfif structkeyexists(server, "boxlang")> <h2>"thisComponent" (BoxLang only) works in BoxLang with isdefined().</h2> <cftry> @@ -48,4 +52,4 @@ Call this as a custom tag using a CFTag or cfscript <h2 style="color:red;">ERROR: "thisComponent" should work in BoxLang.</h2> </cfcatch> </cftry> </cfif> -
JamoCA revised this gist
Nov 10, 2025 . 1 changed file with 34 additions and 16 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,33 +1,51 @@ <!--- 11/10/2025 11:17:33 Custom Tag "thisTag" scope test. Call this as a custom tag using a CFTag or cfscript <cf_TestCustomTag> or cf_TestCustomTag(); ---> <h2>Dump "thisTag"</h2> <cftry> <cfdump var="#thisTag#"> <cfcatch> <div style="color:red;">ERROR: thisTag scope doesn't exist.</div> </cfcatch> </cftry> <h2>isdefined() should return TRUE (works in ACF 2016-2025 and Lucee 5-7)</h2> <cfdump var="#isdefined('thisTag.executionMode')#"> <cfdump var="#isdefined('thisTag.hasEndTag')#"> <h2>structkeyexists() should return TRUE.</h2> <cfdump var="#structkeyexists(thisTag, 'executionMode')#"> <cfdump var="#structkeyexists(thisTag, 'hasEndTag')#"> <h2>OK... does "variables.thisTag" exist? (Returns TRUE in ACF 2016-2025 and Lucee 5-7)</h2> <cfdump var="#structkeyexists(variables, 'thisTag')#"> <h2>Is "thisTag" defined? (Returns TRUE in ACF 2016-2025 and Lucee 5-7)</h2> <cfdump var="#isdefined('thisTag')#"> <h2>Is "variables.thisTag" defined? (Returns TRUE in ACF 2016-2025 and Lucee 5-7)</h2> <cfdump var="#isdefined('variables.thisTag')#"> <h2>if "thisTag" scope is duplicated, isdefined() works in BoxLang using the duplicated scope.</h2> <cfset t = duplicate(thisTag)> <cfdump var="#isdefined('t.executionMode')#"> <cfdump var="#isdefined('t.hasEndTag')#"> <cfif structkeyexists(server, "boxlang")> <h2>"thisComponent" (BoxLang only) works in BoxLang with isdefined().</h2> <cftry> <cfdump var="#isdefined('thisComponent.executionMode')#"> <cfdump var="#isdefined('thisComponent.hasEndTag')#"> <cfcatch> <h2 style="color:red;">ERROR: "thisComponent" should work in BoxLang.</h2> </cfcatch> </cftry> </cfif> -
JamoCA revised this gist
Nov 9, 2025 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -10,15 +10,15 @@ Call this as a custom tag using a CFTag or cfscript <cfdump var="#thisTag#"> <div>isdefined() should return TRUE; works in ACF 2016-2025 and Lucee 5-7</div> <cfdump var="#isdefined('thisTag.executionMode')#"> <cfdump var="#isdefined('thisTag.hasEndTag')#"> <div>structkeyexists() returns TRUE</div> <cfdump var="#structkeyexists(thisTag, 'executionMode')#"> <cfdump var="#structkeyexists(thisTag, 'hasEndTag')#"> <div>if thisTag scope is duplicated, isdefined() works</div> <cfset t = duplicate(thisTag)> <cfdump var="#isdefined('t.executionMode')#"> <cfdump var="#isdefined('t.hasEndTag')#"> -
JamoCA created this gist
Nov 9, 2025 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ <!--- 11/8/2025 19:45:05 Custom Tag "thisTag" scope test. Call this as a custom tag using a CFTag or cfscript <cf_TestCustomTag> or cf_TestCustomTag(); ---> <cfdump var="#thisTag#"> <!--- this should return TRUE; works in ACF 2016-2025 and Lucee 5-7 ---> <cfdump var="#isdefined('thisTag.executionMode')#"> <cfdump var="#isdefined('thisTag.hasEndTag')#"> <!--- this returns TRUE ---> <cfdump var="#structkeyexists(thisTag, 'executionMode')#"> <cfdump var="#structkeyexists(thisTag, 'hasEndTag')#"> <!--- if thisTag scope is duplicated, isdefined() works ---> <cfset t = duplicate(thisTag)> <cfdump var="#isdefined('t.executionMode')#"> <cfdump var="#isdefined('t.hasEndTag')#"> <cftry> <cfdump var="#thisComponent#"> <cfdump var="#isdefined('thisComponent.executionMode')#"> <cfdump var="#isdefined('thisComponent.hasEndTag')#"> <cfcatch> <div>"thisComponent" only works in BoxLang.</div> </cfcatch> </cftry>