Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am trying to create a list of items, that will only list a specific number of items per page. I have created this XSLT for the purpose:
<xsl:param name="currentPage"/><xsl:variable name="itemsPerPage" select="5"/><xsl:variable name="numberOfItems" select="count($currentPage/* [@isDoc and string(umbracoNaviHide) != '1'])"/><xsl:variable name="pageNumber"> <xsl:choose> <xsl:when test="umbraco.library:RequestQueryString('page') = ''"> <xsl:value-of select="1"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="umbraco.library:RequestQueryString('page')"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:template match="/"><!-- The fun starts here --><ul class="albums"> <xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']"> <xsl:if test="position() > $itemsPerPage * number($pageNumber -1) and position() <= number($itemsPerPage * number($pageNumber -1) * $itemsPerPage)"> <li> <a class="fancybox" data-fancybox-group="group" href="{fullSize}"> <xsl:attribute name="data-fancybox-group"><xsl:value-of select="$currentPage/@nodeName"/></xsl:attribute> <img class="vintage" src="/images/vintage.png"/> <img src="{thumbnail}"/> </a> </li> </xsl:if></xsl:for-each> </ul>
But I doesn't seem to work... I am using Umbraco 4.7. Is it a scheme problem or?
Can anyone tell me what I am doing wrong?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
listing number of items
I am trying to create a list of items, that will only list a specific number of items per page. I have created this XSLT for the purpose:
<xsl:param name="currentPage"/>
<xsl:variable name="itemsPerPage" select="5"/>
<xsl:variable name="numberOfItems" select="count($currentPage/* [@isDoc and string(umbracoNaviHide) != '1'])"/>
<xsl:variable name="pageNumber">
<xsl:choose>
<xsl:when test="umbraco.library:RequestQueryString('page') = ''">
<xsl:value-of select="1"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="umbraco.library:RequestQueryString('page')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:template match="/">
<!-- The fun starts here -->
<ul class="albums">
<xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']">
<xsl:if test="position() > $itemsPerPage * number($pageNumber -1) and
position() <= number($itemsPerPage * number($pageNumber -1) * $itemsPerPage)">
<li>
<a class="fancybox" data-fancybox-group="group" href="{fullSize}">
<xsl:attribute name="data-fancybox-group"><xsl:value-of select="$currentPage/@nodeName"/></xsl:attribute>
<img class="vintage" src="/images/vintage.png"/>
<img src="{thumbnail}"/>
</a>
</li>
</xsl:if>
</xsl:for-each>
</ul>
But I doesn't seem to work... I am using Umbraco 4.7. Is it a scheme problem or?
Can anyone tell me what I am doing wrong?
is working on a reply...