This tutorial is based on Webucator’s Comprehensive ColdFusion Training course. ColdFusion’s cfsavecontent> tag provides another mechanism for storing. If you are using CF9 and railo you can use savecontent {} see more info here: http :// It’s not quite the. There are many way to concatenation string in coldfusion but there is one easiest way for that. it can be done using CFSAVECONTENT tag.

Author: Meztikora Tum
Country: Sao Tome and Principe
Language: English (Spanish)
Genre: Life
Published (Last): 23 December 2017
Pages: 104
PDF File Size: 14.33 Mb
ePub File Size: 10.79 Mb
ISBN: 750-2-43354-894-6
Downloads: 17232
Price: Free* [*Free Regsitration Required]
Uploader: Shakataur

Sunday, 30 March How about this for savecontent? Plus there was the need to add a new syntax construct as well. It’s just occurred to me that this was not necessary. A simple function would have done the trick.

coldfusion – CFSAVECONTENT in CFSCRIPT – Stack Overflow

The syntax here is entirely reasonable, and completely clear as to what’s going on. It’s a handy tag. And both failed well: CFML syntax for setting a variable to be the result of some cfsavecontejt is: This is script code, so we should not be thinking in terms of opening and closing tags.


So that syntax is a loser IMO. ColdFusion 11 has just managed to make this worse. Now we’re going back to basically using tags: This is a double fail.

coldfusoon How long will it be before we start forgetting which syntax takes the parentheses and the commas, and which just takes spaces? But this is what’s just occurred to me today.

ColdFusion Fastest String Concatenation Using CFSAVECONTENT

We never needed any special syntax at all to achieve savecontent in CFScript: A plain old function call. We call the savecontent function, it takes a callback which contains the code which we want to capture the output of, and returns that in its return value.

Isn’t that a better approach than messing about with new syntax and weirdo ways of assigning values? This is another example of what I mean that rather than taking a generic approach to implementing previously tag-only functionality in CFScript, it needs a bespoke approach.

CFScript is now a first class citizen of CFML, and it deserves to have its functionality implemented carefully and thoughtfully. Cfsaveconent have added this suggestion as a comment on an existing Adobe ticket: Posted by Adam Cameron at Newer Post Older Post Home.