我有一个第三方组件,它使用joomla的分页系统。如何在不更改后端任何内容的情况下,仅为前端更改每页默认项目的值和限制框的值?
发布于 2013-12-14 02:22:50
这是对seavers的答案的补充,在我看来,这是正确的答案。
我将编写一个示例,说明我如何限制我希望在搜索结果页面中显示的页面数量:
从模板文件root/templates/mytemplate/html/com_search/search/default.php
// number of max pages you want in pagination
$mylimit = 3;
// to prevent showing pages with no resutls
$limit = min($mylimit, $this->pagination->pagesTotal);
// set the limit
$this->pagination->pagesStop = $limit;渲染:

https://stackoverflow.com/questions/9886959
复制相似问题