Modify links in CListView pager to follow routing
- by Thorpe Obazee
I currently have this:
<?php $this->widget('zii.widgets.CListView', array(
'dataProvider'=>$model,
'itemView'=>'_view',
'template' => '{items}{pager}'
)); ?>
The Pager shows me paginations to posts/index?page=2, posts/index?page=3. The problem is that I have routed blog/posts to posts. I am on blog/posts now and all the links in the Pager is showing me posts/index?page=2, page/index?page=3.
I want to have the pager showing links to blog/posts/index?page=2, blog/posts/index?page=3
This my current routing for this:
'urlFormat'=>'path',
'rules'=>array(
'blog/posts' => 'posts',
How should I do this?
Update:
For those confused as to what I am saying: