分页后查看所有链接
是否可以在<<之前或之前添加查看所有结果
链接第一页 1 2 3 最后一页>>分页的链接?
我尝试了一些类似的东西:
// 在控制器(搜索)中:
if(uri_string()=='/search/results/all'){
$config['per_page'] = $config['total_rows'];
}else{
$config['per_page'] = 10;
}
$page['pagination'] = $this->pagination->create_links();
// 和在视图中:
echo $pagination 。 '。 '查看所有结果';
有人知道更好的方法吗?
is it possible to add a view All results
link after or before the << First 1 2 3 Last >> links of the pagination?
I tried some thing like :
// in controller (search) :
if(uri_string()=='/search/results/all'){
$config['per_page'] = $config['total_rows'];
}else{
$config['per_page'] = 10;
}
$page['pagination'] = $this->pagination->create_links();
// and in the view :
echo $pagination .' '. '<a href="/search/results/all">View all results</a>';
Does anyone knows a better way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为更好的方法是扩展 CI 分页类。例如:
您可以在这里找到一个很好的示例: http://codeigniter.com/wiki/Digg_Style_Pagination__-_Non_evasive_aproach< /a>
I think the better way is to extend the CI pagination class. For example:
You can find a good example here: http://codeigniter.com/wiki/Digg_Style_Pagination_-_Non_evasive_aproach