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?

1

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

<xsl:if test="@Order = 1">     
<!-- your logic -->
</xsl:if>
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> 
  • 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