我已經正確設置我的部分/數據源,據我所知。它被設置爲包括系統:分頁和每3個條目的分頁。前端分頁
爲了讓分頁我使用的是流行的xslt utility
這是存檔/類別頁面:
<xsl:import href="../utilities/master.xsl"/>
<xsl:import href="../utilities/pagination.xsl"/>
<xsl:import href="../utilities/get-article.xsl"/>
<xsl:template match="data">
<div class="col span-9">
<div class="span-9">
<h4 class="nudge-3"><xsl:value-of select="categories/entry/title[@handle = $category]"/></h4>
</div>
<xsl:apply-templates select="archive-listing/entry" mode="short"/>
<xsl:call-template name="pagination">
<xsl:with-param name="pagination" select="archive-listing/pagination"/>
<xsl:with-param name="pagination-url" select="{$current-url}/archive/category/{title/@handle}?page=$"/>
</div>
</xsl:call-template>
<div id="sidebar" class="col last span-3">
<xsl:call-template name="social"/>
<xsl:call-template name="category"/>
<xsl:call-template name="tag"/>
<xsl:call-template name="external-links"/>
</div>
</xsl:template>
</xsl:stylesheet>
這裏是我的調試顯示分頁的唯一發生:?
<archive-listing>
<pagination total-entries="11" total-pages="4" entries-per-page="3" current-page="1" />
無論如何,這裏的解決方案。按照卡洛瓦's的建議和他採取的步驟,他告訴我我能夠達到此目的。所以,如果你有這個問題,一定要檢查一下:
<xsl:apply-templates select="archive-listing/entry" mode="short"/>
<xsl:call-template name="pagination">
<xsl:with-param name="pagination" select="archive-listing/pagination"/>
<xsl:with-param name="pagination-url" select="concat($root, '/archive/category/', $category, '/$')"/>
你能鏈接到一個Gist代碼或添加一些代碼讓我們開始? – callovarne