Created by: Timothy Kelty ([email protected]) on 2015/04/02 12:33:05 +0000
Votes at time of UserVoice import: 1
From: https://craftcms.com/docs/routing
There are times I want these flipped (dynamic routes processed first).
It feels clunky to me to do routing logic in our twig templates, which is what that can force you into.
For example, consider a "Pages" structure, with templates going to _page.twig:
routes.php file that got considered first.Is there any progress on this? We are facing the same issue right now, we have a dynamic route, that has the same route like an entry but we need our custom controller to handle it instead of the default Craft controller for certain reasons.
We don't want to set the slugs/urls of those entries to something else in order to keep the entry.getUrl functionality but we want to use a custom action.
Running the latest version of Craft 3 it's still the same routing process
Craft 3 added the EVENT_SET_ROUTE event, which can be used to customize the route of any element.
Most helpful comment
Craft 3 added the EVENT_SET_ROUTE event, which can be used to customize the route of any element.