Skip to content
Discussion options

You must be logged in to vote

Or setting up custom routes matching the sections URI settings, which seem to 'win' over Craft's routing (is that guarenteed??)

Yes, your own application routes will always win from Craft's, the Craft site route is registered as a fallback route.

I do agree it would be cumbersome, so I've added a way to define this when using the SetRoute event: f6903a2

You can look at the tests in that commit on usage.

The matched element can be added as a parameter to your controller's method, either through ElementInterface $element or by its refname, in the case of an entry this would be Entry $entry

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by riasvdv
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@riasvdv
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants