plone - Diazo 取代 <esi :include> tags with <include>

标签 plone diazo

我在 plone 中遇到 Diazo 问题。

我的页面模板中有 标记,但是当我使用 Diazo 时,所有这些标记都会被 替换,即使我是否使用 mode="raw"也是如此。

我找到了一个糟糕的解决方法:

<xsl:template css:match="include">
    <xsl:text disable-output-escaping="yes">&lt;esi:include src="</xsl:text>
    <xsl:value-of select="@src" />
    <xsl:text disable-output-escaping="yes">">&lt;/esi:include></xsl:text>
</xsl:template>

但是当 html 使用 mode="raw"放置时, 标记不会被

有什么想法吗?

非常感谢。

最佳答案

如果您希望在原始模式下处理裸 XSL,则需要将 method="raw"添加到您的 xsl:template 标记中。您可能需要有两个版本的模板标记,一种用于 method="raw",另一种用于默认(无 method 属性)。

XSL 中的模板仅在其方法匹配时才匹配。如果apply模板标签中没有指定apply方法,则该方法为“默认”。

当您在 Diazo 中指示“mode=”raw”时,它会将 method=”raw” 放入应用模板调用中,这会跳过大多数后期处理,包括您未指定 method=”raw 的任何 XSL 模板”。

关于plone - Diazo 取代 <esi :include> tags with <include>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18125897/

相关文章:

plone - 将 LinguaPlone 子语言转换回所有内容的语言?

plone - 如何清理zc.relation目录上的旧接口(interface)?

blob - Collective.xsendfile、ZODB blob 和 UNIX 文件权限

plone - Plone Dexterity 图像内容缺少 getImage 方法?

xslt - Diazo :if not for if-path

testing - 在 Plone 5 的测试中自动安装默认内容类型

plone - 如何将 Plone 中的内容 block 转换为 Diazo 主题

themes - Plone 4.2 - 如何更改 Diazo 主题中的 Logo ?

centos - 无法在 Centos 上使用 Diazo (plone.app.theming)

facebook - xfbml 对 Diazo 的支持