【发布时间】:2012-03-30 06:18:15
【问题描述】:
我正在使用 cakephp 1.3.X 。我在 url 路由和分页方面遇到了一些问题
我的网址看起来像
http://project.dev/search/hamburg/place:1
下面是我的路由代码
Router::connect('/search/:slug/*', array('controller' => 'searches', 'action' => 'index'));
下面是我要进入搜索页面的控制器
$this->redirect(array('controller'=>'searches','action'=>'index','slug'=>$slugUrl,$query));
我的问题是当我转到下一页时,不会显示 place:1 ,只是链接到 search/hamburg/page:2 即。地方不见了
下面给出了我的 index.ctp 分页器选项
$paginator->options = array(
'url'=>array(
'controller'=>'searches',
'action'=>'index',
'slug'=>$this->params['slug'],
));
我怎么了。我在蛋糕文章中搜索了很多,但没有什么对我有用。请指教
【问题讨论】:
标签: php cakephp pagination