【发布时间】:2012-05-03 17:03:12
【问题描述】:
我使用此处给出的答案在 SitEdit 2009 SP2 上启用了内联编辑
How do I enable inline field editing in SiteEdit when using an XSLT TBB?
但在 SiteEdit 中加载结果页面时,我不断收到此错误:
Sys.FormatException:无法从组件 xml 架构中获取类型信息。 字段:cf_tcm:20-33457-64_content_header XPath:[1]
我的 XSLT TBB 片段:
<xsl:if test="//*[local-name()='content_header'] != ''">
<h1>
<div>
<tcdl:ComponentField name="content_header" index="0">
<xsl:value-of select="//*[local-name()='content_header']">
</tcdl:ComponentField>
</div>
</h1>
</xsl:if>
已发布文件中的输出:
<h1>
<div>
<span>
<!-- Start SiteEdit Component Field: {"ID" : "cf_tcm:20-33457-64_content_header", "XPath" : "[1]", "IsMultiValued" : false} -->
<tcdl:ComponentField name="content_header" index="0" SiteEditProcessed="true">
Test
</tcdl:ComponentField>
</span>
</div>
</h1>
我的代码有什么问题?
【问题讨论】:
-
html 内容现在出现在问题中
-
确实如此,但请花点时间在 StackOverflow 上查看代码片段突出显示的工作原理。我现在编辑了您的问题以使用这种格式,但它可能对未来的问题/答案有所帮助。