<p>I think my answer here should provide you with exactly what you need, as well as an elegant and reusable way to do it:</p>

<p><a href="https://craftcms.stackexchange.com/questions/96/how-can-i-route-a-specific-entry-in-a-structure-section-to-its-own-template">How can I route a specific entry in a structure section to its own template?</a></p>

CC BY-SA 3.0
2014-12-16T16:26:18.583Z
2014-12-16T16:26:18.583Z
2017-04-13T12:50:59.930Z
Ben Croker
<p>You could use <a href="http://twig.sensiolabs.org/doc/tags/include.html" rel="nofollow"><code>include</code></a> to load different templates conditionally like so:</p>

<pre><code>{% if entry.id == '24' %}
    {% include "_entries/mystructure_special" %}
{% else %}
    {% include "_entries/mystructure_base" %}
{% endif %}
</code></pre>

<p>Also consider if it makes sense to add a new <a href="http://buildwithcraft.com/docs/sections-and-entries#entry-types" rel="nofollow">Entry Type</a> for this one entry and then set things up per this tutorial: <a href="http://buildwithcraft.com/help/entry-type-templates" rel="nofollow">"How can I give each Entry Type its own template?"</a>. </p>

CC BY-SA 3.0
2014-12-16T19:29:05.537Z
Thank you for your answer @carlcs Ben's approach worked really well for me in this instance.
Gareth
CC BY-SA 3.0
2014-12-16T09:55:15.637Z
2014-12-16T09:55:15.637Z
carlcs
<p>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 <a href="http://buildwithcraft.com/docs/routing" rel="nofollow">route</a> would not work due to the order things are looked up at.</p>

<structure><routing>
Overriding a structure section's template for a single structure entry
# Overriding a structure section's template for a single structure entry

(Asked by: username_0 on 2014-12-16)

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](http://buildwithcraft.com/docs/routing) would not work due to the order things are looked up at.

**Tags:** structure, routing

---

## 2 answers

### Answer by username_1 on 2014-12-16. Score: 3 | Accepted answer

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?](https://craftcms.stackexchange.com/questions/96/how-can-i-route-a-specific-entry-in-a-structure-section-to-its-own-template)


---

### Answer by username_2 on 2014-12-16. Score: 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?".

> **Comments:**
> **username_0**: Thank you for your answer @carlcs Ben's approach worked really well for me in this instance.  

---

