<p>As a more detailed reply to your comment:
<br>You don't need to create a completely new section in order to have a different template. For Example when you create a section called 'Employment' you can have several different <code>entryTypes</code> in this <code>section</code>. In your <code>/admin/settings/sections</code>you can see all your sections (left) and when you click on their <code>entryTypes</code> on the right you'll enter this page <code>/admin/settings/sections/&lt;sectionId&gt;/entrytypes</code> to edit them.</p>

<p>With the following folder structure you can do this:<br>
|-/templates<br>
|--/pages<br>
|---_entry.twig<br>
|---/entryTypes<br>
|----imprint.twig<br>
|----contact.twig<br>
for example your section is called <code>pages</code> and you have the <code>entryTypes</code> imprint and contact.</p>

<p>Your section template is /pages/_entry.twig</p>

<pre><code>{% extends [
    'pages/_entrytypes/' ~ entry.type ~ '.twig'
] %}
</code></pre>

<p>so depending on your entryType the template for imprint or contact will be rendered.</p>

<p>In your case you would create a folder <code>Employment</code> and create different <code>entryTypes</code> for the different templates you want to render. In your <code>Employment</code> you render the template depending on your need.
You can also extend your file to</p>

<pre><code>{% extends [
    'pages/_custom/' ~ entry.slug ~ '.twig',
    'pages/_custom/' ~ entry.someCustomFieldValue ~ '.twig',
    'pages/_entrytypes/' ~ entry.type ~ '.twig',
    'pages/_generic.twig'
] %}
</code></pre>

<p>so you can choose you template via slug/dropdown lists/checkboxes or whatever you want</p>

CC BY-SA 3.0
2017-10-19T15:02:20.107Z
Thank you for your detailed response!

I'm not sure what to do as all the pages have already been set up in structures and given the name of 'pages' so if I start making changes to one it could break the whole website. I have inherited this website and trying to get my head around this.
Chris
CC BY-SA 3.0
2017-10-19T15:11:19.137Z
Is there a way of changing an existing page's design to a new one without affecting the rest of the menu structure?
Chris
CC BY-SA 3.0
2017-10-19T15:21:27.140Z
Not really.. You'll have to edit everything since your queries will change in all files. But that's way you are supposed to build websites in craft. You should build several different sections that group equal components. eg. pages with the entrytypes contact, home, imprint.... employees with the entrytypes boss, worker, typesetter, driver or the section vehicles with the entrytypes car, bus, train and so on... When you do this, you'll be able to query everything very smooth. `{% set pages = craft.entries.section('pages') %}`will give you all pages you can loop to build your menu
Robin Schambach
CC BY-SA 3.0
2017-10-19T15:28:19.243Z
For Example this is one of my recursive menu macros https://pastebin.com/27FNH3NF in order to build all the menus on this page  http://baunach-allianz.de/ (I'm not responsible for the content)
Robin Schambach
CC BY-SA 3.0
2017-10-19T16:01:53.583Z
Thank you. I'm not too sure where to go from here really. I'm not sure if this article answers it: https://craftcms.stackexchange.com/questions/16249/how-to-load-a-different-template-for-parent-page
Chris
CC BY-SA 3.0
2017-10-19T16:27:37.290Z
It's the same logic. Mine is a little bit more complex and dynamic so you can load as many templates as you want. His is easier to understand and "faster" to build but you can't have different templates for different children. If you only have one type of children you could use his. Otherwise there is no real difference. He chooses templates by hierarchy level, I choose templates by entry type. The main key is not choosing the templates by a "single section type"
Robin Schambach
CC BY-SA 3.0
2017-10-19T14:47:37.410Z
2017-10-19T14:53:08.147Z
2017-10-19T14:53:08.147Z
Robin Schambach
<p>Help!</p>

<p>I have a parent page called 'Employment' that is a structure - it has 8 sub pages beneath it. I have just created a new single template and would like this to replace this page - is this possible? </p>

<p>Would really appreciate the help!</p>

CC BY-SA 3.0
2017-10-19T13:51:06.997Z
Your question is really confusing. You have a section with type structure and you created a new template file and would like to replace the current template file with the new one? Because templates are just files that are rendered into your pages (used by entries/categories) they can't replace them
Robin Schambach
CC BY-SA 3.0
2017-10-19T14:00:57.780Z
I'm sorry - i'm really new to Craft. I have a page that uses a completely different design to the rest of the website so I created it as a single - is that the wrong way to do it?
Chris
<templating>
Changing parent page to a single
# Changing parent page to a single

(Asked by: username_0 on 2017-10-19)

Help!

I have a parent page called 'Employment' that is a structure - it has 8 sub pages beneath it. I have just created a new single template and would like this to replace this page - is this possible?

Would really appreciate the help!

**Tags:** templating

> **Comments:**
> **username_1**: Your question is really confusing. You have a section with type structure and you created a new template file and would like to replace the current template file with the new one? Because templates are just files that are rendered into your pages (used by entries/categories) they can't replace them  
> **username_0**: I'm sorry - i'm really new to Craft. I have a page that uses a completely different design to the rest of the website so I created it as a single - is that the wrong way to do it?  

---

## 1 answers

### Answer by username_1 on 2017-10-19. Score: 1

As a more detailed reply to your comment:
You don't need to create a completely new section in order to have a different template. For Example when you create a section called 'Employment' you can have several different entryTypes in this section. In your /admin/settings/sectionsyou can see all your sections (left) and when you click on their entryTypes on the right you'll enter this page /admin/settings/sections//entrytypes to edit them.
With the following folder structure you can do this:
|-/templates
|--/pages
|---_entry.twig
|---/entryTypes
|----imprint.twig
|----contact.twig
for example your section is called pages and you have the entryTypes imprint and contact.
Your section template is /pages/_entry.twig
{% extends [
    'pages/_entrytypes/' ~ entry.type ~ '.twig'
] %}

so depending on your entryType the template for imprint or contact will be rendered.
In your case you would create a folder Employment and create different entryTypes for the different templates you want to render. In your Employment you render the template depending on your need.
You can also extend your file to
{% extends [
    'pages/_custom/' ~ entry.slug ~ '.twig',
    'pages/_custom/' ~ entry.someCustomFieldValue ~ '.twig',
    'pages/_entrytypes/' ~ entry.type ~ '.twig',
    'pages/_generic.twig'
] %}

so you can choose you template via slug/dropdown lists/checkboxes or whatever you want

> **Comments:**
> **username_0**: Thank you for your detailed response!  I'm not sure what to do as all the pages have already been set up in structures and given the name of 'pages' so if I start making changes to one it could break the whole website. I have inherited this website and trying to get my head around this.  
> **username_0**: Is there a way of changing an existing page's design to a new one without affecting the rest of the menu structure?  
> **username_1**: Not really.. You'll have to edit everything since your queries will change in all files. But that's way you are supposed to build websites in craft. You should build several different sections that group equal components. eg. pages with the entrytypes contact, home, imprint.... employees with the entrytypes boss, worker, typesetter, driver or the section vehicles with the entrytypes car, bus, train and so on... When you do this, you'll be able to query everything very smooth. `{% set pages = craft.entries.section('pages') %}`will give you all pages you can loop to build your menu  
> **username_1**: For Example this is one of my recursive menu macros https://pastebin.com/27FNH3NF in order to build all the menus on this page  http://baunach-allianz.de/ (I'm not responsible for the content)  
> **username_0**: Thank you. I'm not too sure where to go from here really. I'm not sure if this article answers it: https://craftcms.stackexchange.com/questions/16249/how-to-load-a-different-template-for-parent-page  
> **username_1**: It's the same logic. Mine is a little bit more complex and dynamic so you can load as many templates as you want. His is easier to understand and "faster" to build but you can't have different templates for different children. If you only have one type of children you could use his. Otherwise there is no real difference. He chooses templates by hierarchy level, I choose templates by entry type. The main key is not choosing the templates by a "single section type"  

---

