Yii data provider pagination how to make human url?

1k views Asked by At

I am setting the pagination variable with the following:

 $dp->pagination = array('pageVar'=>'page'); 

And adding to the main config rule with this:

'/myrule/page/<page:\d+>' => 'controller/action' 

URLs /myrule/page/1 and /myrule/?page=1 work. However, pagination generates /myrule/?page=1. How do I get URLs like /myrule/page/1 from pagination?

1

There are 1 answers

0
user3155400 On

Resolve: displace rule higher on the list - that rule worked before the other.