Modify links in CListView pager to follow routing
Posted
by
Thorpe Obazee
on Stack Overflow
See other posts from Stack Overflow
or by Thorpe Obazee
Published on 2011-01-02T17:16:03Z
Indexed on
2011/01/03
7:53 UTC
Read the original article
Hit count: 273
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:
© Stack Overflow or respective owner