<cfsavecontent>
Saves the generated content inside the tag body in a variable.
This tag must have a body.
This tag is also supported within <cfscript>
<cfsavecontent
variable=string
trim=boolean
append=boolean
><!--- body ---></cfsavecontent>
Examples
<cfoutput>
<cfsavecontent variable="test">
Here you can add any cf, HTML elements etc.,
Where you need it just place the variable of cfsavecontent, automatically shows the content stored here.
</cfsavecontent>
<cfsavecontent variable="example">
<br>
<input type="text" name="textfield">
</cfsavecontent>
#test#
#example#
</cfoutput>
cfsavecontent( variable="test" ){
echo("Here you can add any cf, HTML elements etc.,");
}
echo(test);
See also
- Core CFML Language
- Render()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)