この例のようにhttps://plone-theming-with-diazo.readthedocs.org/en/latest/snippets_diazo/recipes/index.html#add-attributes-on-the-fly 特定のすべてのクラスを変更する必要がありますタグ、値の追加 (コンテンツ側)。
このルールは機能しません:
<xsl:template css:match="ul.navTreeLevel0 li">
<xsl:attribute name="class"><xsl:value-of select="./@class"/> no-bullet</xsl:attribute>
</xsl:template>
「navTreeLevel0」クラスの ul 内のすべての li タグに値「no-bullet」を追加したいと考えています。
Diazo は例外を発生させません。
同じルールファイルで同様の状況が発生しましたが、この場合は機能します:
<replace content="//div[contains(@class,'cell')]/@class">
<xsl:attribute name="class">
<xsl:if test='contains(current(),"width-3:4")'>nine large-9 columns</xsl:if>
<xsl:if test='contains(current(),"width-2:3")'>height large-8 columns</xsl:if>
<xsl:if test='contains(current(),"width-1:2")'>six large-6 columns</xsl:if>
<xsl:if test='contains(current(),"width-1:3")'>four large-4 columns</xsl:if>
<xsl:if test='contains(current(),"width-1:4")'>three large-3 columns</xsl:if>
<xsl:if test='contains(current(),"width-full")'>twelve large-12 columns</xsl:if>
</xsl:attribute>
</replace>
どうしたの?ヴィート