Forum
Runway routes not matching
I have the following routes in Perch:
When I navigate to about/mike-barker
and recipes/chicken-pie
for example, I am taken to the about page or the recipes page and not the individual page itself. Both about/[slug:author]
and recipes/[slug:recipe_slug]
are sub pages and not just routes of the same page. I tried having them as routes of the same page but that doesn't solve anything. This is happening both locally and on my live set up.
Try reordering them to place more specific rules above more general rules.
Thanks Drew, that's fixed it. Not sure why it was out of order.
Runway can't always guess the right order - sometimes it needs a helping hand from human intelligence.
Would that make sense to add this in the doc as a note? I've spent quite sometime trying to figure out what was wrong with my routes for a list / detail setup. Everything was actually fine, only problem was with the order.
Apart from that, upgrading to Runway was indeed pretty straightforward.
Cheers!
EDIT: it's actually already mentioned here: https://docs.grabaperch.com/runway/routing/ adding the indication that it should the most specific rules above could be useful though.