【发布时间】:2014-01-14 11:02:42
【问题描述】:
我正在使用<cfinclude> 在母版页中包含各种页面。在我的母版页中,所有正文内容都包含在 <cfoutput> 标记中。但是我注意到,经过测试,包含的 .cfm 页面根本看不到 <cfoutput> 标签,因此不显示动态数据。
<body>
<cfoutput>
<cfinclude template="page1.cfm" />
<cfinclude template="page2.cfm" />
<cfinclude template="page3.cfm" />
</cfoutput>
</body>
在上面的示例中,包含动态数据的包含模板将无法正常显示。为了解决这个问题,我必须在每个 CFM 文件中添加 <cfoutput> 标签。为什么他们不能使用正文中已经存在的<cfoutput>标签?
【问题讨论】:
-
pageX.cfm里有什么东西。我从来没有像这样包裹<cfincludes>