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

CFTAGS and CFSCRIPT counterparts?

Explorer ,
Oct 18, 2017 Oct 18, 2017

Copy link to clipboard

Copied

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.

Views

2.2K

Translate

Translate

Report

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");

Votes

Translate

Translate
LEGEND ,
Oct 18, 2017 Oct 18, 2017

Copy link to clipboard

Copied

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,

^ _ ^

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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."

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

^ _ ^

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Get a life and stop trying to run mine.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

cfheader and cfcontent DO have script equivalents, aptly named:

cfheader() and cfcontent()

example:

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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. 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

 

 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Hello, fox2,

 

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

 

V/r,

 

^ _ ^

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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. 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

 

Examples of both tag and script use cases.

 

HTH,

 

^ _ ^

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

Ahh yes thanks! Good find.

Votes

Translate

Translate

Report

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
Documentation