Answer the question
In order to leave comments, you need to log in
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
'customer/suppliers/<id:\d+>' => 'customer/suppliers/view',
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question