Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <xsl:template match="pagination">
- <div class="row-fluid">
- <div class="span12">
- <div class="pagination pagination-centered">
- <ul>
- <xsl:if test="@current-page = 1">
- <li class="disabled"><a href="#">«</a></li>
- </xsl:if>
- <xsl:if test="@current-page != 1">
- <li><a href="{$root}{$current-path}/?page=1">«</a></li>
- </xsl:if>
- <xsl:call-template name="iterator">
- <xsl:with-param name="iterations" select="@total-pages"/>
- <xsl:with-param name="callback" select="'pagination-component'"/>
- <xsl:with-param name="callback-params">
- <current-page><xsl:value-of select="@current-page"/></current-page>
- </xsl:with-param>
- </xsl:call-template>
- <xsl:if test="@current-page = @total-pages">
- <li class="disabled"><a href="#">»</a></li>
- </xsl:if>
- <xsl:if test="@current-page != @total-pages">
- <li><a href="{$root}{$current-path}/?page={@total-pages}">»</a></li>
- </xsl:if>
- </ul>
- </div>
- </div>
- </div>
- </xsl:template>
- <xsl:template name="pagination-component" mode="iterator-callback">
- <xsl:param name="position"/>
- <xsl:if test="current = $position">
- <li class="disabled"><a href="#"><xsl:value-of select="current-page"/></a></li>
- </xsl:if>
- <xsl:if test="current != $position">
- <li><a href="{$root}{$current-path}/?page={$position}"><xsl:value-of select="$position"/></a></li>
- </xsl:if>
- </xsl:template>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement