Skip to content

Instantly share code, notes, and snippets.

@JamoCA
Last active July 18, 2022 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JamoCA/2d48f9eb88ceb7f8bcb93fc3ab718ffa to your computer and use it in GitHub Desktop.
Save JamoCA/2d48f9eb88ceb7f8bcb93fc3ab718ffa to your computer and use it in GitHub Desktop.
Testing nuance when calling a CFM-based custom tag using cfscript. #coldfusion #cfml
<!--- 20220718 CustomTag CFScript "Nuance"
Blog: https://dev.to/gamesover/customtag-cfscript-nuance-4nig
Tweet: https://twitter.com/gamesover/status/1549111965523386368
--->
<p>This executes the custom tag only one (1) time.</p>
<cf_helloCount>
<P>When called from cfscript, this CFM-based custom tag is executed twice.</p>
<cfscript>
cf_helloCount();
</cfscript>
<cfparam name="request.timesCalled" default="0">
<cfset request.timesCalled +=1>
<cfoutput>
<p>Hi! (Times called: #request.timesCalled#)</p>
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment