Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Paul Griffiths 370 posts 1021 karma points
    Apr 17, 2014 @ 12:37
    Paul Griffiths
    0

    XSLT Pagination

    Hey all,

    Another XSLT search related problem i'm experiencing here and could do with some help please.

    I have created an xslt pagination and it seems to be working fine when no search parameters are used to filter but the problem I have got is How do I keep the search form parameters in the pagination when moving next and prev?

    Hopefully someone can see something here is my code so far..

    <xsl:for-each select="$locationNodes[(not(normalize-space($typeNodes))) and (not(normalize-space($capacityNodes)))] | $typeNodes[(not(normalize-space($locationNodes))) and (not(normalize-space($capacityNodes)))] | $capacityNodes[(not(normalize-space($locationNodes))) and (not(normalize-space($typeNodes)))] | $locationNodes[(@id = $typeNodes/@id) and (@id = $capacityNodes/@id)] | $locationNodes[(@id = $capacityNodes/@id) and (not(normalize-space($typeNodes)))] | $locationNodes[(@id = $typeNodes/@id) and (not(normalize-space($capacityNodes)))] | $typeNodes[(@id = $capacityNodes/@id) and (not(normalize-space($locationNodes)))] | $keywordNodes">
    
    
                    <p class="paging">Pages:
      <xsl:if test="$pageNumber &gt; 1">
                      <a title="Previous" class="arrows" href="?page={$pageNumber -1}">
                                      <xsl:value-of select="$prev" />
                      </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 $itemsPerPage)"></xsl:with-param>
      </xsl:call-template>
    
    
      <xsl:if test="(($pageNumber) * $itemsPerPage) &lt; ($numberOfItems)">
        <a title="Next" class="arrows" href="?page={$pageNumber +1}">
                                    <xsl:value-of select="$next" /></a>
      </xsl:if>
                    </p>
    

    Any help would be awesome and if you need me to post anymore code or explain further then please ask.

    Thanks

    Paul

Please Sign in or register to post replies

Write your reply to:

Draft