# Single blueprint with multiple templates

**URL:** <https://forum.getkirby.com/t/single-blueprint-with-multiple-templates/33558>\
**Category:** Questions\
**Tags:** v4\
**Created:** [February 8, 2025, 1:32pm UTC](https://forum.getkirby.com/t/single-blueprint-with-multiple-templates/33558 "2025-02-08T13:32:12Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kia](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/kia/32/11393_2.png) [@Kia](https://forum.getkirby.com/u/Kia)\
**Post date:** [February 8, 2025, 1:32pm UTC](https://forum.getkirby.com/t/single-blueprint-with-multiple-templates/33558/1 "2025-02-08T13:32:12Z")

</div>

**Wanted outcome:**

I’d like to have a single Blueprint (easier to manage) with multiple page themes. And to be able to _‘Change template’_ for any page.

**What currently works:**

Right now everything is working as I have each theme with their relevant blueprint. So I’m able to change themes with no issues.

The Blueprints all work with what I have tried with below, but not the themes switching.

**What I’ve tried:**

When I try removing the current `[page].yml` contents and replacing it with…

```auto
title: Photos

extends: layouts/default

pages: true

```

…it doesn’t work.

I’ve also tried to adding the following to above and also the `default.yml` file…

```auto
options:
  changeTemplate:
    - default
    - articles
    - posts
    - photos
    - videos
    - newsletter
    - quotes
    - testimonials
    - tools
    - search
    - export
    - fullpage

```

I’ve even removed all `[page].yml` files and created a plugin…

```auto
  Kirby::plugin('kia/singleblueprint', [
    'blueprints' => [
      'pages/photos' => __DIR__. '/default.yml',
      'pages/posts' => __DIR__. '/default.yml'
    ]
  ]);

```

The Blueprints do work with all of the methods above, but I never get access to the _‘Change template’_ option with any of the methods.

**Notes**

Kirby 4.6.1  
Localhost

**What am I missing:**

I’m not sure if there’s something I’ve overlooked. Any help in the right direction would be grand!

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Kia](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/kia/32/11393_2.png) [@Kia](https://forum.getkirby.com/u/Kia)\
**Post date:** [February 8, 2025, 1:34pm UTC](https://forum.getkirby.com/t/single-blueprint-with-multiple-templates/33558/2 "2025-02-08T13:34:08Z")

</div>

_ **NOTE:** _

_ **The forum wasn’t giving my an option to add a tag for the ‘Questions’ category for some reason. So feel free to move this post. if needed. Thanks.** _

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [February 8, 2025, 4:17pm UTC](https://forum.getkirby.com/t/single-blueprint-with-multiple-templates/33558/3 "2025-02-08T16:17:22Z")

</div>

Hm, I don’t really understand what you are trying to do. What is a “theme” in your understanding, a template in Kirby speak?

---

<div class="post-metadata">

**Author:** ![Kia](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/kia/32/11393_2.png) [@Kia](https://forum.getkirby.com/u/Kia)\
**Post date:** [February 8, 2025, 4:36pm UTC](https://forum.getkirby.com/t/single-blueprint-with-multiple-templates/33558/4 "2025-02-08T16:36:53Z")

</div>

Sorry, I mean ‘Template’ not theme.

_(Changed the title of the post)_

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [February 8, 2025, 4:58pm UTC](https://forum.getkirby.com/t/single-blueprint-with-multiple-templates/33558/5 "2025-02-08T16:58:42Z")

</div>

The blueprint assigned to a page determines its content filename, and the content filename in turn determines the template that is used to render the page.

So if you want to have a different layout for pages that use same blueprint, instead of using multiple templates, you could use different snippets to display the content. You could then use a “theme switcher” select field inside the page blueprint to decide inside the template which snippet to use.

---

<div class="post-metadata">

**Author:** ![Kia](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/kia/32/11393_2.png) [@Kia](https://forum.getkirby.com/u/Kia)\
**Post date:** [February 8, 2025, 5:09pm UTC](https://forum.getkirby.com/t/single-blueprint-with-multiple-templates/33558/6 "2025-02-08T17:09:10Z")

</div>

Understood.

I already use snippets for some items. However, what I’d like to do is make what I’d like to accomplish more efficient.

As I explained, everything works just fine other than being able to use the ‘Change template’ drop down menu –– it’s greyed out.

So I’m wondering if it’s a feature, a bug or me missing a setting/option in the `.yml` file for the reason I can’t change templates.

If we have the option to have a default layout using `extends: layouts/default` or by crating a specific plug in, then it should be possible to change the template?

No?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [February 8, 2025, 6:10pm UTC](https://forum.getkirby.com/t/single-blueprint-with-multiple-templates/33558/7 "2025-02-08T18:10:54Z")

</div>

Could you post the complete blueprint with those settings?

---

<div class="post-metadata">

**Author:** ![Kia](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/kia/32/11393_2.png) [@Kia](https://forum.getkirby.com/u/Kia)\
**Post date:** [February 8, 2025, 6:23pm UTC](https://forum.getkirby.com/t/single-blueprint-with-multiple-templates/33558/8 "2025-02-08T18:23:51Z")

</div>

Sure, but I’m not 100% sure what to post, but here goes…

Notice that `default.yml` and `posts.yml` are exactly the same, this will allow my to change template.

But when I try to use the `extends: layouts/default` [feature](https://getkirby.com/docs/guide/blueprints/extending-blueprints#reusing-and-extending-entire-layouts) with `photo.yml` and the `/layout/default.yml` even though it works fine, I’m unable to change template.

Hope that makes sense.

* * *

Here’s the full `/layout/default.yml`

```auto
title: Default

options:
  changeTemplates:
    - default
    - articles
    - posts
    - photos
    - videos
    - newsletter
    - quotes
    - testimonials
    - tools
    - search
    - export
    - fullpage

tabs:
  Post:
    columns:
      main:
        width: 2/4
        sections:
          main:
            type: fields
            fields:
              video_platform:
                type: select
                label: Use video platform.........
                options:
                  bunny: Bunny
                  youtube: YouTube
                  x: X
                  odysee: Odysee
                  dailymotion: Dailymotion
                  rumble: Rumble
              odysee:
                  label: Odysee
                  type: url                  
              dailymotion:
                  label: Dailymotion
                  type: url
              rumble:
                label: Rumble
                type: url                  
              video:
                label: Bunny video ID
                type: text
              youtube:
                label: YouTube
                type: url
              x:
                label: X
                type: url
              post_header:
                label: Header
                type: text
              post_subheader:
                label: Subheader
                type: textarea
                size: small
              pre_post:
                label: Pre post
                type: textarea
                size: small
              post:
                label: The post
                type: textarea
                size: large                 
      sidebar:
        width: 1/4
        sections:
          sidebar:
            type: fields
            fields:
              images_files:
                label: Images & files
                type: files
                sortable: true
                layout: cards
                image: 
                  cover: true
                  ratio: 1/1
              show_image:
                label: Image in post
                type: checkboxes
                options:
                  Yes: no
              tags:
                label: Tags
                type: tags
                max: 3
                options:
                  type: query
                  query: site.index.pluck("tags", ",", true)
              date:
                label: date
                display: MMM D YYYY
                default: now
                required: true
              time:
                label: Time
                type: time
                default: now
                step:
                  unit: minute
                  size: 1
                required: true
             
      sidebarr:
        width: 1/4
        sections:
          sidebarr:  
            type: fields
            fields:
              image_meta:
                label: Meta thumbnail
                type: files
                max: 1
                layout: cards
                image: 
                  cover: true
                  ratio: 1/1
              title_meta:
                label: Meta title
                type: text
              description_meta:
                label: Meta description
                type: textarea
                size: small
                buttons: false
              featured_post:
                type: toggle
                label: Featured post
                text:
                  - 'No'
                  - 'Yes'
              subscriber_only:
                type: toggle
                label: Subscriber only post
                text:
                  - 'No'
                  - 'Yes'
              landing_page:
                type: toggle
                label: Landing page
                text:
                  - 'No'
                  - 'Yes'
              hide_items:
                label: Hide...
                type: checkboxes
                options:
                  Logo: no
                  Navigation: no
                  Posts: no 
  Notes:            
    width: 4/4
    sections:
      notes:
        type: fields
        fields:
          note:
            type: textarea
            size: large

```

Here’s the full `photo.yml`

```auto
title: Photos

extends: layouts/default

options:
  changeTemplate:
    - default
    - articles
    - posts
    - photos
    - videos
    - newsletter
    - quotes
    - testimonials
    - tools
    - search
    - export
    - fullpage

```

Here’s the full `posts.yml`

```auto
title: Post

options:
  changeTemplate:
    - default
    - articles
    - posts
    - photos
    - videos
    - newsletter
    - quotes
    - testimonials
    - tools
    - search

create:
  fields:
    - tags

tabs:
  Post:
    columns:
      main:
        width: 2/4
        sections:
          main:
            type: fields
            fields:
              video_platform:
                type: select
                label: Use video platform...
                options:
                  bunny: Bunny
                  youtube: YouTube
                  x: X
                  odysee: Odysee
                  dailymotion: Dailymotion
                  rumble: Rumble
              odysee:
                  label: Odysee
                  type: url                  
              dailymotion:
                  label: Dailymotion
                  type: url
              rumble:
                label: Rumble
                type: url                  
              video:
                label: Bunny video ID
                type: text
              youtube:
                label: YouTube
                type: url
              x:
                label: X
                type: url
              post_header:
                label: Header
                type: text
              post_subheader:
                label: Subheader
                type: textarea
                size: small
              post:
                label: The post
                type: textarea
                size: large                
      sidebar:
        width: 1/4
        sections:
          sidebar:
            type: fields
            fields:
              images_files:
                label: Images & files
                type: files
                sortable: true
                layout: cards
                image: 
                  cover: true
                  ratio: 1/1
              show_image:
                label: Image in post
                type: checkboxes
                options:
                  Yes: no
              tags:
                label: Tags
                type: tags
                max: 3
                options:
                  type: query
                  query: site.index.pluck("tags", ",", true)
              date:
                label: date
                display: MMM D YYYY
                default: now
                required: true
              time:
                label: Time
                type: time
                default: now
                step:
                  unit: minute
                  size: 1
                required: true
             
      sidebarr:
        width: 1/4
        sections:
          sidebarr:  
            type: fields
            fields:
              image_meta:
                label: Meta thumbnail
                type: files
                max: 1
                layout: cards
                image: 
                  cover: true
                  ratio: 1/1
              title_meta:
                label: Meta title
                type: text
              description_meta:
                label: Meta description
                type: textarea
                size: small
                buttons: false
              featured_post:
                type: toggle
                label: Featured post
                text:
                  - 'No'
                  - 'Yes'
              subscriber_only:
                type: toggle
                label: Subscriber only post
                text:
                  - 'No'
                  - 'Yes'
              landing_page:
                type: toggle
                label: Landing page
                text:
                  - 'No'
                  - 'Yes'
              hide_items:
                label: Hide...
                type: checkboxes
                options:
                  Logo: no
                  Navigation: no
                  Posts: no 
  Notes:            
    width: 4/4
    sections:
      notes:
        type: fields
        fields:
          note:
            type: textarea
            size: large            

```

Here’s the full `default.yml`

```auto
title: Post

options:
  changeTemplate:
    - default
    - articles
    - posts
    - photos
    - videos
    - newsletter
    - quotes
    - testimonials
    - tools
    - search

create:
  fields:
    - tags

tabs:
  Post:
    columns:
      main:
        width: 2/4
        sections:
          main:
            type: fields
            fields:
              video_platform:
                type: select
                label: Use video platform...
                options:
                  bunny: Bunny
                  youtube: YouTube
                  x: X
                  odysee: Odysee
                  dailymotion: Dailymotion
                  rumble: Rumble
              odysee:
                  label: Odysee
                  type: url                  
              dailymotion:
                  label: Dailymotion
                  type: url
              rumble:
                label: Rumble
                type: url                  
              video:
                label: Bunny video ID
                type: text
              youtube:
                label: YouTube
                type: url
              x:
                label: X
                type: url
              post_header:
                label: Header
                type: text
              post_subheader:
                label: Subheader
                type: textarea
                size: small
              post:
                label: The post
                type: textarea
                size: large                
      sidebar:
        width: 1/4
        sections:
          sidebar:
            type: fields
            fields:
              images_files:
                label: Images & files
                type: files
                sortable: true
                layout: cards
                image: 
                  cover: true
                  ratio: 1/1
              show_image:
                label: Image in post
                type: checkboxes
                options:
                  Yes: no
              tags:
                label: Tags
                type: tags
                max: 3
                options:
                  type: query
                  query: site.index.pluck("tags", ",", true)
              date:
                label: date
                display: MMM D YYYY
                default: now
                required: true
              time:
                label: Time
                type: time
                default: now
                step:
                  unit: minute
                  size: 1
                required: true
             
      sidebarr:
        width: 1/4
        sections:
          sidebarr:  
            type: fields
            fields:
              image_meta:
                label: Meta thumbnail
                type: files
                max: 1
                layout: cards
                image: 
                  cover: true
                  ratio: 1/1
              title_meta:
                label: Meta title
                type: text
              description_meta:
                label: Meta description
                type: textarea
                size: small
                buttons: false
              featured_post:
                type: toggle
                label: Featured post
                text:
                  - 'No'
                  - 'Yes'
              subscriber_only:
                type: toggle
                label: Subscriber only post
                text:
                  - 'No'
                  - 'Yes'
              landing_page:
                type: toggle
                label: Landing page
                text:
                  - 'No'
                  - 'Yes'
              hide_items:
                label: Hide...
                type: checkboxes
                options:
                  Logo: no
                  Navigation: no
                  Posts: no 
  Notes:            
    width: 4/4
    sections:
      notes:
        type: fields
        fields:
          note:
            type: textarea
            size: large            

```

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [February 8, 2025, 7:04pm UTC](https://forum.getkirby.com/t/single-blueprint-with-multiple-templates/33558/9 "2025-02-08T19:04:38Z")

</div>

The option is called `changeTemplate`(singular), not changeTemplate **s**. Seems to be correct in all but `layouts/default.yml. Bit confusing also that you use the same title `post` for both default.yml and posts.yml

Apart from that, changing templates works for me with those blueprints.

---

<div class="post-metadata">

**Author:** ![Kia](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/kia/32/11393_2.png) [@Kia](https://forum.getkirby.com/u/Kia)\
**Post date:** [February 9, 2025, 3:14pm UTC](https://forum.getkirby.com/t/single-blueprint-with-multiple-templates/33558/10 "2025-02-09T15:14:20Z")

</div>

Oh man, it’s always the simplest thing!

Thanks [yet] again @texnixe!!

All fixed.
