A
A
akula222016-04-21 11:24:21
Yii
akula22, 2016-04-21 11:24:21

How to dynamically create correctly in UrlManager for static pages?

I'm making a static page module and I want their urls to be two-level, /about/contact and not /static/about.
In the menu of the main page, I display links like this
['/pages/default/view', 'alias' => 'about'],
in the url manager

'<alias:(about|stock|contact)>' => 'pages/default/view',

Question: how can I dynamically create a rule in urlManager when creating/changing a new page in the admin

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2016-04-21
@akula22

https://github.com/yiisoft/yii2/blob/master/docs/g...
https://github.com/yiisoft/yii2/blob/master/docs/g...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question