Combine pager with sorter CListView


I want to combine pagination and sorting, with nice url…

Don’t sure how to do that…

the urls I have now are:

'index/page-<page:\d+>/*' => 'blog/index',	


Now I want to add sorter

The sorting urls now look very ugly…

for example sorting by title:

to remove the ajax/yw0 stuff, I just used in paginator

 'params' => array(),

And this removed the ajax rubbish, but if I add this to the sort the sorter wont see the page number…

and the pager don’t see the pagination…


 'params' => array(),

is not the way to go…

but I don’t want google to index ajax/ywo stuff… I must remove that :blink:

help someone, hope this is not that confusing ;)

up, or no one using CListView ?

At least you can get rid of the "yw0" by specifying an id for the widget. Edit: And you can specify your own ajaxVar




Hi Tommy, and if I don’t want ajax var at all?

How google will index such stuff? with some added vars? or this is taken in account?

To the best of my understanding, ajaxVar was introduced because isAjaxRequest (XMLHttpRequest) reportedly wasn’t always reliable.

It is used for url creation very near the end of jquery.yiilistview.js. You probably would have to modify something at server side too.