2

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.

Gareth
  • 1,605
  • 2
  • 14
  • 35

2 Answers2

3

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?

Ben Croker
  • 7,341
  • 26
  • 55
1

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?".

carlcs
  • 36,220
  • 5
  • 62
  • 139
  • Thank you for your answer @carlcs Ben's approach worked really well for me in this instance. – Gareth Dec 16 '14 at 19:29