Reputation: 1763
I have a problem with Yii urlManager.
I have a page that is a list of videos, so I add the following rule:
'videos'=>'video/index'
Now I want to add the page:
'videos_pag<Video_page:\d+>'=>'video/index'
I tried this:
'videos(_pag<Video_page:\d+>)?'=>'video/index',
but it does not work properly.
Upvotes: 1
Views: 2566
Reputation: 2134
Use two lines, if first fails, second will work (if everything correct) :)
'videos_pag<Video_page:\d+>'=>'video/index',
'videos'=>'video/index',
Upvotes: 4