When you create a structure section you set which template that you would like to use. Is there a way to override that for a single entry in that structure? If I have missed it in the docs I apologise but it would appear that setting a route would not work due to the order things are looked up at.
2 Answers
I think my answer here should provide you with exactly what you need, as well as an elegant and reusable way to do it:
How can I route a specific entry in a structure section to its own template?
You could use include
to load different templates conditionally like so:
{% if entry.id == '24' %}
{% include "_entries/mystructure_special" %}
{% else %}
{% include "_entries/mystructure_base" %}
{% endif %}
Also consider if it makes sense to add a new Entry Type for this one entry and then set things up per this tutorial: "How can I give each Entry Type its own template?".
-
Thank you for your answer @carlcs Ben's approach worked really well for me in this instance.– GarethDec 16, 2014 at 19:29