How to automatically assign a layout to taxonomy term?

I feel like I must be missing something obvious, here's what I have set up:

  • Taxonomy called Clients
  • Added /views/clients/show.antlers.html
  • Added a term called Client Name (for example)
  • Also the layout I use for pages is in views/layouts/default.antlers.html

However, when I go to /clients/client-name I get the error View [layout] not found. (see http://flareapp.io/share/A7EvLlB5)

I'm guessing it's looking for the default layout, not my custom one?

If i go and edit client-name.yaml I can see it is missing a layout key, so i can fix this by adding:

layout: layouts/default

...then everything works fine, but obviously I don't want to have to edit the yaml file for every future taxonomy term I create.

How do i make it happen automatically?

>>>>>>> Unanswered <<<<<<<
1 Reply
2 Followers