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?


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

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

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 -->
  • Dave, that does not work because item style is template caused one by one and condition will be always true. – Ashish Patel Dec 21 '11 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy