Answer the question
In order to leave comments, you need to log in
How to bring links in cnc view YII2?
Please tell me what instructions you need to write in web/urlManager/rules so that the links
- to the category were: /categoryname/
- the link to the article was: /categoryname/articlename , or even better just /articlename
And if you can explain how it is configured, according to the official documentation fails to do.
Now the links look like this:
https://sitename /site/category?slug=categoryname
https://sitename /site/post?slug=articlename
Tried:
// хлебные крошки
'page/<page:\d+>' => 'site/index',
'/' => 'site/index',
// категория
'<slug:>' => 'site/category',
// пост
'<slug:>' => 'site/post',
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question