Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-16T16:26:18.583Z
Answers.LastActivityDate: 2014-12-16T16:26:18.583Z
Answers.LastEditDate: 2017-04-13T12:50:59.930Z
Answers.UserDisplayName: Ben Croker
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-16T19:29:05.537Z
Answers.Text: Thank you for your answer @carlcs Ben's approach worked really well for me in this instance.
Answers.UserDisplayName: Gareth
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-16T09:55:15.637Z
Answers.LastActivityDate: 2014-12-16T09:55:15.637Z
Answers.UserDisplayName: carlcs
Body: <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>
  
Tags: <structure><routing>
Title: Overriding a structure section's template for a single structure entry
ThreadText: # 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`](http://twig.sensiolabs.org/doc/tags/include.html) 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](http://buildwithcraft.com/docs/sections-and-entries#entry-types) for this one entry and then set things up per this tutorial: ["How can I give each Entry Type its own template?"](http://buildwithcraft.com/help/entry-type-templates).
  
  > **Comments:**
  > **username_0**: Thank you for your answer @username_2 Ben's approach worked really well for me in this instance.  
  
  ---
  
  