通过Coldfusion中的cfset获取长/多行内容

Dan*_*iel 5 coldfusion

有没有办法用cfset设置一个更像cdata标签的变量

还是有另一种方法可以让页面设置一些基本变量,并为主要内容设置几个较长的变量;

即.

<cfoutput>
<CFSET page_title = "TITLE">
<CFSET examplevariable = "ABC">

<CFSET content>
 <!--something like this-->
 <div>
   bunch of content without any cf tags
 </div>
</CFSET>

<cfinclude template="include/layout.cfm">

</cfoutput>
Run Code Online (Sandbox Code Playgroud)

小智 15

<cfsavecontent variable="header">
  <cfoutput>
     I can be HTML, javascript anything text.
     remember to escape pound sysmbols ie: ##FF0000 instead of #FF0000
     I can even <cfinclude template="headerpage.cfm"> and will be stored in variable 
     called header
  </cfoutput>
</cfsavecontent>

<cfoutput>#header#</cfoutput>
Run Code Online (Sandbox Code Playgroud)