Salvete! I have a list with a Choice field called "Scope". I want to add a class to that field using XSL, but I can't figure out how to get it to change. I want all the items in that field to get my css class, but also keep the ms-vb2 class. Here is my attempt:
I've gotten this far, but it doesn't seem to quite work.
<xsl:template match="FieldRef[@Name='Scope']" mode="Text_body">
<xsl:param name="thisNode" select="."/>
<td class="ms-vb2">
<xsl:attribute name="class">mycssclass</xsl:attribute>
<xsl:value-of select="$thisNode/@Scope" />
</td>
</xsl:template>
I tried this, too:
<xsl:template match="FieldRef[@Name='Scope']" mode="Choice_body">
<xsl:param name="thisNode" select="."/>
<td class="ms-vb2 RatingsCSStoken">{$thisNode/@Scope}</td>
</xsl:template>
Maybe I don't have the mode
right? I've tried everything.
I am using a custom xsl file in the _layouts directory, and using the match to make changes to any column with that fieldref name.
[two months later] I am still stuck on this. Doesn't anyone have a clue?