Pagination / refine search results

You should use GET method to submit the form (make sure you have a hidden field to store the ‘r’ parameter representing the current route).

You should declare a URL rule for this particular page. The rule should not end with * (otherwise all query params will appear in the path info).

Hi qiang,

Yes I’m now usin the get method to submit the form, however I’m now having problems with the CLinkPager, as details in this post: http://www.yiiframework.com/forum/index.php?/topic/5376-pagination-refine-search-results/page__view__findpost__p__28008

As I said, declare a URL rule for this: ‘search/results’=>‘search/results’

Where/how? Can you give me the full code please? Thanks.

In app config:




'urlManager'=>array(

    'urlFormat'=>'path',

    'rules'=>array(

         'search/results'=>'search/results',

    ),

),



You may also refer to: http://www.yiiframework.com/doc/cookbook/53/

Wow that’s worked! Thanks so much for your help qiang :)