Codeigniter分页库中的首页链接问题 [英] First page link issue in Codeigniter pagination library
本文介绍了Codeigniter分页库中的首页链接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
一段时间以来,我一直在处理分页课程中的一个问题.
For a period of time, I have been dealing with an issue in pagination class.
问题在于,除第1页的链接外,所有带有分页的内容都可以.
The problem is that, everything with pagination is okay, except the link of page 1.
所有链接都像:
example.com/method/page/2
example.com/method/page/3
...
但是,当我要转到第1页时,链接看起来像:
but, when I want to go to the page 1, the link looks like :
example.com/method/page/
当然看起来有些尴尬. 我希望它看起来像:
and of course it looks somehow awkward. I want it to look like:
example.com/method/page/1
如何在分页库中解决此问题?!
How can I fix this issue in pagination library?!
推荐答案
您可以自定义分页.在此处查找分页指南
You can customize your pagination. Look here for Pagination Guide
$config['first_url'] = 'method/page/1';
$this->pagination->initialize($config);
编辑:要查看所有列表,请进入system/librares/Pagination.php
EDIT: To see all list look into system/librares/Pagination.php
这篇关于Codeigniter分页库中的首页链接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文