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
Hi guys,
I have a news XSLT where there is about 20items being displayed monthly and to make this more user friendly i added a pagintor but its not showing up. To this has anything to do with the fact that am using the macros in the eidtor?
here is the piece of code am using
<xsl:variable name="source" select="/macro/source"/><xsl:variable name="itemsToDisplay" select="1"/><xsl:variable name="numberOfItems" select="count($currentPage/* [@isDoc and string(umbracoNaviHide) != '1'])"/> <!-- Paging --><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><xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1']"> <xsl:sort select="current()/eventDate" order="descending"/> <xsl:if test="position () <= $itemsToDisplay"> <li class="eventLink"> <a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="eventTitle"/> </a> </li> </xsl:if></xsl:for-each></ul> <xsl:if test="$pageNumber > 1"> <a href="?page={$pageNumber -1}#events">previous </a></xsl:if> <xsl:call-template name="for.loop"> <xsl:with-param name="i"> 1 </xsl:with-param> <xsl:with-param name="count" select="ceiling($numberOfItems div $itemsToDisplay)"></xsl:with-param></xsl:call-template> <xsl:if test="(($pageNumber) * $itemsToDisplay) < ($numberOfItems)"> <a href="?page={$pageNumber+1}#events"> next</a></xsl:if> </xsl:template> <xsl:template name="for.loop"> <xsl:param name="i"/> <xsl:param name="count"/> <xsl:if test="$i <=$count"> <xsl:if test="$pageNumber!= $i"> <a href="?page={$i}#events"><xsl:value-of select="$i" /> </a> </xsl:if> <xsl:if test="$pageNumber = $i"> <xsl:value-of select="$i"/> </xsl:if> <xsl:call-template name="for.loop"> <xsl:with-param name="i" select="$i + 1" /> <xsl:with-param name="count" select="$count"> </xsl:with-param> </xsl:call-template> </xsl:if></xsl:template>
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Paging
Hi guys,
I have a news XSLT where there is about 20items being displayed monthly and to make this more user friendly i added a pagintor but its not showing up. To this has anything to do with the fact that am using the macros in the eidtor?
here is the piece of code am using
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.