E
E
EVOSandru62016-06-19 12:18:53
Yii
EVOSandru6, 2016-06-19 12:18:53

How to make in Yii1 that in the module by url it was possible to refer to the action view without the word view?

Good afternoon,
Unfortunately, at the address of the form:
domen.loc/customer/suppliers/1
I get into actionIndex , but I would like to get into actionView
It turns out only through domen.loc/customer/suppliers/view/1
I have the following rules:

'/'                                                         =>  'users/login',
        '<action:(login|logout|registration)>'                      =>  'users/<action>',
        '<action:(contact)>'                                        =>  'site/<action>',
        '<controller:\w+>/<id:\d+>'                                 =>  '<controller>/view',
        '<controller:\w+>/<action:\w+>/<id:\d+>'                    =>  '<controller>/<action>',
        '<controller:\w+>/<action:\w+>'                             =>  '<controller>/<action>',
        /** User */
        '<module:customer>'                                         =>   '<module>/orders/index',
        '<module:customer>/<controller:\w+>/<id:\d+>'               =>   '<module>/<controller>/view',
        '<module:customer>/<controller:\w+>'                        =>   '<module>/<controller>/index',
        '<module:customer>/<controller:\w+>/<action:\w+>/<id:\d+>'  =>   '<module>/<controller>/<action>',
        '<module:customer>/<controller:\w+>/<action:\w+>'           =>   '<module>/<controller>/<action>',
        /** Адимин */
        '<module:sadmin>'                                           =>   '<module>/orders/index',
        '<module:sadmin>/<controller:\w+>/<id:\d+>'                 =>   '<module>/<controller>/view',
        '<module:sadmin>/<controller:\w+>'                          =>   '<module>/<controller>/index',
        '<module:sadmin>/<controller:\w+>/<action:\w+>/<id:\d+>'    =>   '<module>/<controller>/<action>',
        '<module:sadmin>/<controller:\w+>/<action:\w+>'             =>   '<module>/<controller>/<action>',

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Natarov, 2016-06-19
@EVOSandru6

'customer/suppliers/<id:\d+>' => 'customer/suppliers/view',

On the right is the exact route, on the left is how it should look. maybe so
But punycode is a perversion)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question