CFSAVECONTENT in CFSCRIPT

Pritesh Patel picture Pritesh Patel · Sep 7, 2011 · Viewed 9.1k times · Source

I am good fan of cfsavecontent due to we can convert long text to variable (Event I can dump in it). But recently more started working with CFSCRIPT and can't figure out how to use it inside cfscript tag.

Is there any way to write cfsavecontent inside cfscript. As per my knowledge there is no such function or class available and sure it is pretty hard to implement as well.

Appreciate any feedback.

Thanks Pritesh

Answer

Dawesi picture Dawesi · Sep 7, 2011

If you are using CF9 and railo you can use savecontent {} see more info here:

http://www.isummation.com/blog/cfsavecontent-in-cf9-cfscript/

It's not quite the same as you need to use writeoutput to output the items. This can also done by appending output to a variable.