用户
 找回密码
 入住 CI 中国社区
搜索
查看: 3046|回复: 3
收起左侧

设置了url_suffix后的分页问题

[复制链接]
发表于 2009-6-23 01:22:36 | 显示全部楼层 |阅读模式
设置了url_suffix为.html
分页出了问题
分页设置:
   $pageConfig['base_url'] = site_url('news/newsList');
   $pageConfig['total_rows'] = $this->count_all($cat);
   $pageConfig['per_page'] = 10;
   $pageConfig['uri_segment'] = 3;
   $pageConfig['full_tag_open'] = '';
   $pageConfig['full_tag_close'] = '';
   return $pageConfig;

列表页连接为:http://localhost/news/newsList.html
第二页的页码连接却成了:
[url=http://localhost/news/newsList.html/10]http://localhost/news/newsList.html/10[/url]
这样报错找不到文件的
应该是这个连接才对http://localhost/news/newsList/10.html

请问怎么回事啊,是不是设置了url_suffix,分页类就不好用了????

谢谢!
 楼主| 发表于 2009-6-23 01:42:07 | 显示全部楼层
看了一下pagination,果然没有对设置url_suffix的判断,给pagination类加上一个url_suffix属性,然后更改creat_links方法,给每个连接后都加上.$this->url_suffix就算修改好了pagination类。
应用:
在设置page的config的时候加上一条$pageConfig['url_suffix'] = '.html';
搞定,写下来记住啦,嘿嘿
发表于 2009-6-23 11:21:08 | 显示全部楼层
呵呵,看来是分页类没有考虑后缀的问题,需要进行一些扩展。
发表于 2014-9-15 19:23:01 | 显示全部楼层

本版积分规则