How to transform block of content from plone being inserted into diazo theme

非 Y 不嫁゛ 提交于 2019-12-01 09:13:12

Ok, so the following works. The reason it wasn't working before was that the <xsl:template> was not in the root level rules tag (there's a documentation bug there). The <xsl:template> must be in the root level rules tag because there is no way to apply rule conditions to an <xsl:template> currently.

<xsl:template css:match="div#portal-searchbox input.searchButton">
     <button type="submit"><img src="images/search.png" alt="Search" /></button>
</xsl:template>

<replace css:theme="div#portal-searchbox" css:content="div#portal-searchbox"/>

Update: I've added support for <replace content="..."> to Diazo, so inline <xsl:template>'s are considered deprecated. Instead use:

<replace css:content="div#portal-searchbox input.searchButton">
    <button type="submit"><img src="images/search.png" alt="Search" /></button>
</replace>
<replace css:theme="div#portal-searchbox" css:content="div#portal-searchbox"/>

Documentation at http://diazo.org/advanced.html#modifying-the-content-on-the-fly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!