Adding an class to body element with XDV

后端 未结 1 374
天命终不由人
天命终不由人 2021-01-14 09:43

I want to style some forms in Plone3+collective.xdv but I don\'t want all forms to get the special style.

So I\'d like to add a special styled-form clas

相关标签:
1条回答
  • 2021-01-14 09:57

    With Diazo/plone.app.theming you can merge attributes from the template and content, see: http://diazo.org/basic.html#merge

    If you can't upgrade then you'll need to do this with inline XSL, something like:

    <prepend theme="/html/body" css:if-content="body.template-contact-info"><xsl:attribute name="class"><xsl:value-of select="/html/body/@class"/> styled-form</xsl:attribute></prepend>
    

    Update: I forgot the tag in the example above. It should work now.

    0 讨论(0)
提交回复
热议问题