Skip to main content
[Edit removed during grace period]
Link
Ben Croker
  • 7.8k
  • 27
  • 56
Source Link
Ben Croker
  • 7.8k
  • 27
  • 56

How can I route a specific entry in a structure section to its own template?

While setting up a site recently I wanted to route a specific entry in a structure section to its own custom template. Using a dynamic route sounded like the right option until I remembered that it wouldn't work due to Craft's routing order (matched entry uri comes before matched template).

I considered adding a conditional redirect to the structure's generic template but this feels a bit dirty. Does anyone have a better solution of how to make this work?