XSLT atribute tip
April 16, 2009 Leave a comment
If you want to add a class ore just toggle between two classes, there’s lots of ways to do this ,.. but I think this is by far the smartest way ,. (c:
<div>
<xsl:if test="@id = $sc_item/ancestor-or-self::item/@id">
<xsl:attribute name="class">active</xsl:attribute>
</xsl:if>
Blah ,blah ,.. mjau mjau ,..
<div>