Random tip of the week with <cfsavecontent>:
<cfsavecontent variable="tag" trim="true">
This
is
some
content
</cfsavecontent>
<!--- Straight CFML Scripting version: --->
<cfscript>
savecontent variable="script" trim="true" {
writeOutput( '
This
is
some
content
' );
}
</cfscript>
<cfoutput>|#tag#|#script#|</cfoutput>
I had some sample tabs in the above, but the blog destroys the tabs -- feel free to manually add them back. This feature has been around for some time now, so it should be safe to use in any version of Railo 3.1 -- Be safe and test it out anyway.
3 responses so far ↓
1 Naveen Krishnamurthy // Sep 1, 2010 at 10:20 AM
2 Kristof Polleunis // Oct 3, 2010 at 2:52 PM
http://www.coldfusionjedi.com/index.cfm/2006/7/26/ColdFusion-Whitespace-Options
3 Evik James // Oct 13, 2010 at 9:26 PM
Leave a Comment