Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFTAGS and CFSCRIPT counterparts?

Explorer ,
Oct 18, 2017 Oct 18, 2017

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.

3.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Oct 18, 2017 Oct 18, 2017

cfheader and cfcontent DO have script equivalents, aptly named:

cfheader() and cfcontent()

example:

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

Translate
LEGEND ,
Oct 18, 2017 Oct 18, 2017

CFCONTENT and CFHEADER do not have CFSCRIPT equivalents.

https://helpx.adobe.com/coldfusion/developing-applications/the-cfml-programming-language/extending-c...

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

V/r,

^ _ ^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 18, 2017 Oct 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."

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 19, 2017 Oct 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.

^ _ ^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 19, 2017 Oct 19, 2017

It wasn't taken to be toward Adobe., but none-the-less, the attitude still persists.    I would suggest you edit the post and remove the comment all-together.  I would then suggest you get out of the house and practice communicating with humans more often.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 19, 2017 Oct 19, 2017

Get a life and stop trying to run mine.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 19, 2017 Oct 19, 2017

And the attitude still persists. 

while (true) {

    cfloop (attitude in WolfShade) {

        if (attitude.terseResponses == "challenged") {

            writeOutput("more terse responses");

        }

    }

}

You're stuck in a loop.     CTRL-ALT-DEL

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 19, 2017 Oct 19, 2017

The attitude isn't going away, especially when you keep stabbing with YOUR terse responses.  That means you're stuck in the loop, too.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 18, 2017 Oct 18, 2017

cfheader and cfcontent DO have script equivalents, aptly named:

cfheader() and cfcontent()

example:

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 19, 2017 Oct 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. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 19, 2017 Oct 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 08, 2020 Sep 08, 2020

Hi Adam,

 

I went to your cfscript link above but I couldn't find the equivalent of CFCONTENT.  And it's not listed in the 'no equivalent' sections either. If there is a cfscript equivalent what is the actual syntax/example?

 

- La

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 08, 2020 Sep 08, 2020

Hello, fox2,

 

I believe that this link should be able to provide you with information related to using CFSCRIPT.

 

V/r,

 

^ _ ^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 08, 2020 Sep 08, 2020

Thanks @wolfshade but I am actually after CFCONTENT equivalent in cfscript. I couldn't find it in the link you gave me. The actual syntax (or examples) seems to be very rare in the web. All I can find are tag-based syntax. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 08, 2020 Sep 08, 2020

A quick Google search found this:  https://cfdocs.org/cfcontent

 

Examples of both tag and script use cases.

 

HTH,

 

^ _ ^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 08, 2020 Sep 08, 2020
LATEST

Ahh yes thanks! Good find.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources