cfsavecontent

Description

Saves the generated content inside the tag body in a variable.

Category

Variable manipulation tags

Syntax


<cfsavecontent variable = "variable name">

  content

</cfsavecontent> 

See also

cfcookie, cfparam, cfregistry, cfschedule, cfset

Attributes

Attribute
Description
variable
Required. The name of the variable in which to save the generated content inside the tag.

Usage

This tag saves everything in the body of the cfsavecontent tag, including the results of evaluating expressions and executing custom tags, in the specified variable.

Example

The following example uses a custom tag to generate a report and saves the report in the variable content. It then replaces all instances of the word "report" with the phrase "MyCompany Quarterly Report" and outputs the result.

<cfsavecontent variable="content">

  <CF_OutputBigReport>

</cfsavecontent>

<cfoutput>

  #replace(content, "report", "MyCompany Quarterly Report", "all")#

</cfoutput>



Banner.Novgorod.Ru