Knowledge Walls
Gopal Rao
Mumbai, Maharashtra, India
Passcode:
How to count first list item,current list item and last list item in cqwp by using Xslt
2747 Views
Example
	<xsl:variable name="Count">
	     <xsl:number level="single" count="Row"/>
	</xsl:variable>
	       <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row" />
	       <xsl:variable name="lastPosition" select="count($Rows)" /><!--Gives the last position of list item -->
	       <xsl:variable name="CurPosition" select="$Count" /><!--Gives the current position of list item -->
	<!--used the positions in if statement below -->
	<xsl:if test="$CurPosition= '1'">
	<!-- codes -->
	</xsl:if>
	<xsl:if test="$CurPosition= $lastPosition">
	<!-- codes -->
	</xsl:if>
Best Lessons of "Sharepoint(MOSS) XSLT codes"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details