0

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 2

1

Try following because *Main.xsl passes @order parameter to ItemStyle.xsl:

<xsl:if test="@Order = 1">     
<!-- your logic -->
</xsl:if>
0
1

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> 
1
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.