G
G
GSmaster2016-02-16 10:43:39
Yii
GSmaster, 2016-02-16 10:43:39

UrlManager - how to do it when sorting?

'arc/<page:[0-9]+>' => 'arc/index',
'arc/'=>'arc/index',

these two rules give the following result
site.ru/arc
site.ru/arc/2
and how to do it when sorting from site.ru/arc/2?sort=id or site.ru/arc?sort=id
respectively site.ru/ arc/sort/id and site.ru/arc/2/sort/id
tell me please

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GSmaster, 2016-02-16
@GSmaster

'arc/<page:\d+>/<sort>/*'=>'arc/index',                                  
'arc/<page:\d+>/*'=>'arc/index',                                                 
'arc/<sort>/*'=>'arc/index',
'arc/*'=>'arc/index',

actually it will be like this and even without /page/ and /sort/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question