当我使用create_pagination()助手创建一个带分页模块时,我在链接中得到一个问号。限制已被设置为6,所以我期望链接按照0,6,12,18的顺序排列,但是Im得到1?,2?,3 ?.PyroCMS分页不起作用
这是正在生成什么:
<a href="http://site.com/mymodule/page/?">1</a>
<a href="http://site.com/mymodule/page/2?">2</a>
这是II期待:
<a href="http://site.com/mymodule/page/">1</a>
<a href="http://site.com/mymodule/page/6?">2</a>
通过在控制器中的代码Im为;
public function index($offset = 0)
{
$limit = 6;
$total_items = $this->mymodel_m->count_all();
$items = $this->mymodel_m
->limit($limit)->offset($offset )
->get_all();
$data->pagination = create_pagination('mymodule/page/', $total_items, $limit, 3);
...
}
任何援助将不胜感激。
我有同样的问题,我已经“修理”它用笨 –