Answers.Body: <p>I'd go with using entry types, using the entry type handle to route to the correct template. This way all sections can be set to use the same template, something like:</p>
  <pre><code>{% if entry is defined %}
    {% set template = '_entryTypes/' ~ entry.type.handle %}
    {% include template %}
  {% endif %}
  </code></pre>
  <p>As an aside, I'd always consider pages like T&amp;Cs, or Privacy Policy to be the default page template; they are not the exceptions, they are the most basic type of page and required on every site; i.e.; a 'generic' page. When you need to add features or update that layout, that is when you create a more bespoke page type.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-11-12T10:37:11.517Z
Answers.LastActivityDate: 2024-11-12T10:37:11.517Z
Answers.UserDisplayName: Seth Warburton
Answers.Body: <p>You might want to create another section for pages with another template. Alternatively you could create more entry types in the same section and create a proxy template that renders a different template for each entry type.</p>
  <p>The latter would probably also be doable without a proxy template because you can use Twig in the section template field – a dynamic template path so to say. Personally I would prefer the proxy template because it has a higher readability.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-29T19:38:20.963Z
Answers.LastActivityDate: 2024-10-29T19:38:20.963Z
Answers.UserDisplayName: Johannes
Body: <p>We currently have pages like Terms &amp; Conditions and Privacy Policy that need a unique template. Right now, all entry-type pages use a shared template, but for these specific pages (and any similar ones we may add in the future), we’d like to assign a distinct template.</p>
  <p>I'm considering setting up a proxy template, but since the number of these pages might grow, it would be best to provide an option in the admin panel to select the template directly. We’re working with Craft 3.15.</p>
  <p>Let me know your thoughts!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-10-29T19:38:48.783Z
Comments.Text: Just to make sure: Craft 3 is not supported anymore and you might want to upgrade to v4 soon.
Comments.UserDisplayName: Johannes
Tags: <craft3><templating>
Title: How to add template option for pages
ThreadText: # How to add template option for pages
  
  (Asked by: username_0 on 2024-10-29)
  
  We currently have pages like Terms & Conditions and Privacy Policy that need a unique template. Right now, all entry-type pages use a shared template, but for these specific pages (and any similar ones we may add in the future), we’d like to assign a distinct template.
  
  I'm considering setting up a proxy template, but since the number of these pages might grow, it would be best to provide an option in the admin panel to select the template directly. We’re working with Craft 3.15.
  
  Let me know your thoughts!
  
  **Tags:** craft3, templating
  
  > **Comments:**
  > **username_1**: Just to make sure: Craft 3 is not supported anymore and you might want to upgrade to v4 soon.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2024-11-12. Score: 0
  
  I'd go with using entry types, using the entry type handle to route to the correct template. This way all sections can be set to use the same template, something like:
  
  ```
  {% if entry is defined %}
    {% set template = '_entryTypes/' ~ entry.type.handle %}
    {% include template %}
  {% endif %}
  
  ```
  
  As an aside, I'd always consider pages like T&Cs, or Privacy Policy to be the default page template; they are not the exceptions, they are the most basic type of page and required on every site; i.e.; a 'generic' page. When you need to add features or update that layout, that is when you create a more bespoke page type.
  
  
  ---
  
  ### Answer by username_1 on 2024-10-29. Score: 0
  
  You might want to create another section for pages with another template. Alternatively you could create more entry types in the same section and create a proxy template that renders a different template for each entry type.
  
  The latter would probably also be doable without a proxy template because you can use Twig in the section template field – a dynamic template path so to say. Personally I would prefer the proxy template because it has a higher readability.
  
  
  ---
  
  