# Different blueprints same template

**URL:** <https://forum.getkirby.com/t/different-blueprints-same-template/8542>\
**Category:** Questions\
**Tags:** v2\
**Created:** [September 18, 2017, 6:39pm UTC](https://forum.getkirby.com/t/different-blueprints-same-template/8542 "2017-09-18T18:39:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![thewebprojects](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/thewebprojects/32/10107_2.png) [@thewebprojects](https://forum.getkirby.com/u/thewebprojects)\
**Post date:** [September 18, 2017, 6:39pm UTC](https://forum.getkirby.com/t/different-blueprints-same-template/8542/1 "2017-09-18T18:39:18Z")

</div>

Hello, I have two pages. They each have a unique blueprint. I’d like them to use the same template. Is this possible? Using the default template is not an option?

I have pretty much the same logic in these two pages. Maybe I should include the code of one template in the other?

Thoughts?

---

<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:** [September 18, 2017, 7:08pm UTC](https://forum.getkirby.com/t/different-blueprints-same-template/8542/2 "2017-09-18T19:08:28Z")

</div>

If they have a unique blueprint, you obviously can’t use the same template. You could use the default template, or use two templates but include the same snippet.

---

<div class="post-metadata">

**Author:** ![thewebprojects](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/thewebprojects/32/10107_2.png) [@thewebprojects](https://forum.getkirby.com/u/thewebprojects)\
**Post date:** [September 18, 2017, 7:15pm UTC](https://forum.getkirby.com/t/different-blueprints-same-template/8542/3 "2017-09-18T19:15:56Z")

</div>

Understood. Thanks for confirming.

---

<div class="post-metadata">

**Author:** ![Caleb](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/caleb/32/2889_2.png) [@Caleb](https://forum.getkirby.com/u/Caleb)\
**Post date:** [January 23, 2018, 12:07am UTC](https://forum.getkirby.com/t/different-blueprints-same-template/8542/4 "2018-01-23T00:07:13Z")

</div>

I know this is a bit of a thread revival, but I would find the ability to share templates amongst blueprints incredibly helpful.

My specific use case: in the website I’m currently working on, I have just one “Directory” template that is used in a lot of different contexts. Here’s just a small sample:

- A “Jobs” page with a list of available jobs.
- An “Events” page with a list of upcoming events.
- A “Resources” page with a list of external links and internal pages.
- A “News” page, similar to a simple blog.

It makes sense for these pages to use the same PHP template, as they all share the same appearance and logic (they show their “children” in a list).

However, using the same template means that all of those directory pages also must use the same blueprint. Hence, I can’t [specify](https://getkirby.com/docs/panel/blueprints/subpages-settings#templates-for-subpages) that the “Jobs” page should only accept subpages with the “Job” template. Instead, I have to permit every single subpage template that could be used in any context. The end result is that when adding a subpage, my client is faced with a long list of irrelevant template choices to choose from, which is not ideal.

I _could_ just add a bunch of templates for every single directory type and handle the logic in a snippet, but that just doesn’t feel very DRY to me and would almost double my current template count.

---

<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:** [January 23, 2018, 7:23am UTC](https://forum.getkirby.com/t/different-blueprints-same-template/8542/5 "2018-01-23T07:23:18Z")

</div>

Then I’d use the default template and make sure all other pages have a specific blueprint. Another option would be routes that load a template, but you would then have to pass all data to the template in your route, well, maybe not all because you can use a default controller, but some.

---

<div class="post-metadata">

**Author:** ![lukaskleinschmidt](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/lukaskleinschmidt/32/13388_2.png) [@lukaskleinschmidt](https://forum.getkirby.com/u/lukaskleinschmidt)\
**Post date:** [January 23, 2018, 8:20am UTC](https://forum.getkirby.com/t/different-blueprints-same-template/8542/6 "2018-01-23T08:20:24Z")

</div>

It is also possible to register your template for different models using the registry.

```php
// Assuming you have a template called list.php
$kirby->set('template', [
  'jobs',
  'events',
  'resources',
  'news'
], $kirby->roots()->templates() . DS . 'list.php');

```

On top they would all share the same controller.

---

<div class="post-metadata">

**Author:** ![Caleb](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/caleb/32/2889_2.png) [@Caleb](https://forum.getkirby.com/u/Caleb)\
**Post date:** [January 23, 2018, 6:40pm UTC](https://forum.getkirby.com/t/different-blueprints-same-template/8542/7 "2018-01-23T18:40:18Z")

</div>

@lukaskleinschmidt, you are my hero! That worked like a dream.

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:30pm UTC](https://forum.getkirby.com/t/different-blueprints-same-template/8542/8 "2025-02-06T17:30:10Z")

</div>


