开发者

long/multiline content through cfset in Coldfusion

is there a way to set a variable with cfset that acts more like a cdata tag

or is there another way of having a page with some basic variables set and a couple of longer variables set for the main content;

ie.

<cfoutput>
<CFSET page_title = "TITLE">
<CFSET exampleva开发者_开发百科riable = "ABC">

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

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

</cfoutput>


<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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜