Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xslt 前端分页_Xslt_Xpath_Symphony Cms - Fatal编程技术网

Xslt 前端分页

Xslt 前端分页,xslt,xpath,symphony-cms,Xslt,Xpath,Symphony Cms,据我所知,我已正确设置了分区/数据源。它被设置为包括system:pagination,还包括每3个条目的分页 为了获得分页,我使用了一个流行的 这是存档/分类页面: 这是我的调试,显示了唯一出现的分页: <archive-listing> <pagination total-entries="11" total-pages="4" entries-per-page="3" current-page="1" /> 不管怎样,这是解决办法。按照卡洛瓦恩的建议,

据我所知,我已正确设置了分区/数据源。它被设置为包括system:pagination,还包括每3个条目的分页

为了获得分页,我使用了一个流行的

这是存档/分类页面:

这是我的调试,显示了唯一出现的分页:

<archive-listing>
    <pagination total-entries="11" total-pages="4" entries-per-page="3" current-page="1" />
不管怎样,这是解决办法。按照卡洛瓦恩的建议,按照他告诉我的步骤,我能够做到这一点。因此,如果您遇到此问题,请务必检查:

      <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, '/$')"/>
选中这些选项以启动:

数据源输出:在调试中的分页元素中查找期望值 实用程序可以访问传递的参数 我想您对分页模板的调用可能如下所示:

    <xsl:call-template name="pagination">
        <xsl:with-param name="pagination" select="archive-listing/pagination"/>
        <xsl:with-param name="pagination-url" select="concat($current-url, '/archive/category/', title/@handle, '?page=$')"/>
    </xsl:call-template>

你能链接到要点或添加一些代码让我们开始吗?谢谢,这样更好。我现在遇到了一个错误,而不是什么都没有!我现在正试图把它放到归档页面上,因为我可以在看不见的地方测试它。我将更新我的原始问题以显示错误。我用{}做了一个oops,我想…试试concat?是的!我刚刚到达那个。。。你的格式和我的有点不同。分页现在显示,但单击它会检索如下链接:archive/category/all/?page=4,每次只返回第1页?我会继续努力!您的数据源是否设置为接受页面URL参数?现在设置为!我刚刚做了那件事。还将其更改为以下格式:concat$current url,title/@handle,“/$”使其正常工作,我同意。这管用!但当我点击另一个页面时,它会将其添加到当前的url。。。so/category/all/2/3。。。我应该可以从这里解决这个问题。谢谢你的帮助。
    <xsl:call-template name="pagination">
        <xsl:with-param name="pagination" select="archive-listing/pagination"/>
        <xsl:with-param name="pagination-url" select="concat($current-url, '/archive/category/', title/@handle, '?page=$')"/>
    </xsl:call-template>