Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-10-2009, 02:53 PM   PM User | #1
fidgen
New Coder

 
Join Date: Apr 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
fidgen is an unknown quantity at this point
SharePoint XSL - counting rows vs position()

Hiya,

I'm having a problem applying a style to a sharepoint ItemStyle.xsl template. I want to apply a style to a list (limited to showing the top 3 items) but then once the 3rd item is displayed, I want to have a "view all" link to the document library.

The current template I'm working with looks a bit like this, but you'll see once I try to declare <xsl:value-of select="position()" /> it outputs "1" every time. Because the template works on @row - each item is number 1!

How do I break out of this and select the true position in the web part?

Thanks for any help

Code:
	<xsl:template name="EMEAFiles" match="Row[@Style='EMEAFiles']" mode="itemstyle">
		<div style="margin:10px 10px 0px 10px; height:57px">
	      <a href="{$SafeLinkUrl}" ><img src="../PublishingImages/icon_{$IconType}.jpg" alt="" height="57px" width="57px" style="float:left; border:0" /></a>
	      <a href="{$SafeLinkUrl}" ><h1><xsl:value-of select="@Title"  /></h1></a>
            <xsl:if test="string-length(@Description0) != 0">
            	<p><xsl:value-of select="@Description0" /></p>
            </xsl:if>
	      <p>[.<xsl:value-of select="$IconType" />, <xsl:value-of select="$EMEAFileSize" />]</p>
		</div>
		<xsl:value-of select="position()" />
	</xsl:template>
fidgen is offline   Reply With Quote
Reply

Bookmarks

Tags
position(), sharepoint, xsl

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:12 AM.


Advertisement
Log in to turn off these ads.