In one of my itemstyles I want the first element in the list to have a bit different look than the other items being displayed. How is it possible to take the first item?
2 Answers
Try following because *Main.xsl passes @order parameter to ItemStyle.xsl:
<xsl:if test="@Order = 1">
<!-- your logic -->
</xsl:if>
This isn't really a SharePoint question but I think the answer you are looking for is something like this:
<xsl:if test="position() = 1">
<!-- do your custom formatting logic -->
</xsl:if>
-
Dave, that does not work because item style is template caused one by one and condition will be always true. Dec 21, 2011 at 16:01