Answer the question
In order to leave comments, you need to log in
Zend Framework 2. Is it possible to make two different actions have the same route?
Good afternoon.
There is such a hypothetical problem. The site has simple pages and category pages. Both can have the url site.ru/category_or_page_name
Is it possible to attach one route to two different actions and then:
1. look in the page action, if there is no page, exit the action; if there is, execute it and display the page.
2. in the category action, look, if there is no category, exit the action; if there is, execute it and display the contents of the category.
3. if nothing is found on this route, display an error that the page does not exist.
Is this even possible?
Some clients resist with a horn and give them similar functionality, and they do not want such urls site.ru/page/page_name orsite.ru/catalog/category_name
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