我在我的网站中使用自定义主题。我的主题网址是:http://localhost/main/theme
我需要分页来显示页面中的所有用户。我想设置分页网址如下所示:
http://localhost/main/theme/user/page:1
这是我的路线:
Router::connect('/main/:theme/user/',
array('controller' => 'custom_themes', 'action' => 'user'),
array(
'pass' => array('theme'),
'theme' => '[a-z]+'
)
);
分页页面为:
$this->paginator->options(array('url'=> array(
'controller' => 'custom_themes',
'action' => 'user',
'theme'=>$this->params['theme'])
));
但我得到了错误的网址。我无法找出问题所在。请帮我。