Skip to main content
Inspiring
October 18, 2017
Answered

CFTAGS and CFSCRIPT counterparts?

  • October 18, 2017
  • 2 replies
  • 3290 views

Trying to find a matrix or anything that describes which CFTAGS have equivalent CFSCRIPT counterparts?   I was under the impression that all tags in 2016 have cfscript counterparts, however CFCONTENT and CFHEADER do not seem to have cfscript versions?  

A list of what is or isn't supported in cfscript would be ideal.

Thanks.

This topic has been closed for replies.
Correct answer jscnet

cfheader and cfcontent DO have script equivalents, aptly named:

cfheader() and cfcontent()

example:

cfheader (name="Hello", value="10");

2 replies

Inspiring
October 19, 2017

Just FYI for future questions like this, I've done my best to document CFScript thoroughly here: https://github.com/adamcameron/cfscript/blob/master/cfscript.md

 

There is a general form form tag->script:

To use any other functionality not listed here within CFScript, one needs to use the generalised syntax.

On Railo/Lucee this is a matter of removing the "<cf" and the ">", and using normal block syntax (curly braces) where the tag-version is a block-oriented tag.

On ColdFusion (CF11+), replace the "<cftagname" with "cftagname(", and the ">" with ")", and comma-separate the attributes. 

jscnetAuthor
Inspiring
October 19, 2017

Adam, this is outstanding, great job!   The ultimate cheet-sheet (if you will).      I actually stumbled across cfdocs.org, it is an excellent resource too and when searching for a TAG the CFSCRIPT version is shown also.

WolfShade
Legend
October 18, 2017

CFCONTENT and CFHEADER do not have CFSCRIPT equivalents.

https://helpx.adobe.com/coldfusion/developing-applications/the-cfml-programming-language/extending-coldfusion-pages-with-cfml-scripting/what-is-supported-in-cfscript.html

Hopefully, Adobe will address this issue.  But I'm not holding my breath.

V/r,

^ _ ^

jscnetAuthor
Inspiring
October 18, 2017

Language (attitudes) like this makes you look pretty dumb.   Remove it and I'll consider marking yours as the answer.   Leave it, and look like an asshole to all who read it.

"Hopefully, Adobe will address this issue.  But I'm not holding my breath."

WolfShade
Legend
October 19, 2017

Adobe has a history of ignoring bugs, or marking them as closed without actually fixing anything.  Just look at Adobe Bug Tracker, and you'll see.

Don't like my attitude toward Adobe?  Don't respond to anything I post. Simple.

^ _ ^