# Common and inherited blueprints to hierarchise subcategory of content?

**URL:** <https://forum.getkirby.com/t/common-and-inherited-blueprints-to-hierarchise-subcategory-of-content/28561>\
**Category:** Questions\
**Tags:** v3\
**Created:** [May 11, 2023, 9:52am UTC](https://forum.getkirby.com/t/common-and-inherited-blueprints-to-hierarchise-subcategory-of-content/28561 "2023-05-11T09:52:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![reyman](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@reyman](https://forum.getkirby.com/u/reyman)\
**Post date:** [May 11, 2023, 9:52am UTC](https://forum.getkirby.com/t/common-and-inherited-blueprints-to-hierarchise-subcategory-of-content/28561/1 "2023-05-11T09:52:02Z")

</div>

Hi,

I’m searching the good way to reproduce this hiearchy with blueprints, is it possible ?

A the end i need to have one “publication.html” page capable to display common (publications.yml) and specific field (publications.hdr.yml, publications.phd.yml, etc.) from my different type of publications.

Actually i have one big _publications.yml_ file that contain all the fields, common and specific, this is not clear for users. So my idea was to broke this into different specific panel, accessible on the same common “publication” list (using common fields type and theme), with filtering possibility.

I made a schema to better represent the idea :

 ![shapes(4)](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/a/a439bbf6f66fe950f80195521c07eb839dec4cf6.jpeg)

---

<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:** [May 11, 2023, 10:54am UTC](https://forum.getkirby.com/t/common-and-inherited-blueprints-to-hierarchise-subcategory-of-content/28561/2 "2023-05-11T10:54:16Z")

</div>

I the fields are basically the same and some fields depend on the value of other fields, it might make sense to use conditional fields rather than separate blueprints?

> **[Fields](https://getkirby.com/docs/guide/blueprints/fields#conditional-fields)**
>
> Form fields are an essential part of the configuration and have very powerful options.

---

<div class="post-metadata">

**Author:** ![reyman](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@reyman](https://forum.getkirby.com/u/reyman)\
**Post date:** [May 11, 2023, 12:19pm UTC](https://forum.getkirby.com/t/common-and-inherited-blueprints-to-hierarchise-subcategory-of-content/28561/3 "2023-05-11T12:19:09Z")

</div>

Yes, i see, why not !

I also think about moving/transorming this layout that manage a long list of publications with filters into TABs : one tab for each type of publication. But i suppose this is not possible with condition fields isn’t it @texnixe ?

---

<div class="post-metadata">

**Author:** ![reyman](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@reyman](https://forum.getkirby.com/u/reyman)\
**Post date:** [May 12, 2023, 8:15am UTC](https://forum.getkirby.com/t/common-and-inherited-blueprints-to-hierarchise-subcategory-of-content/28561/4 "2023-05-12T08:15:26Z")

</div>

I prefer the structure in blueprint to better separate content, i try this :

**/pages/publications.yml :**

```auto
title: Publications

sections:
  pages:
    extends: sections/theses
    status: all
  pages:
    extends: sections/hdr
    status: all

```

**/sections/hdr.yml :**

```auto
type: pages
parent: site.find("publications")
label: HDR
template: publication.hdr
empty: No articles yet
sortBy: date desc

```

**/sections/theses.yml :**

```auto
type: pages
parent: site.find("publications")
label: Theses
template: publication.hdr
empty: No articles yet
sortBy: date desc

```

**/pages/publication.these.yml :**

```auto
title: Thèse
icon: 📖

status:
  draft:
    label: Draft
    text: The article is still in draft mode. It can only be seen by editors with panel access.
  unlisted:
    label: In Review
    text: The article is online and can be visited with the direct URL. The team must still give the final go to publish it.
  listed:
    label: Published
    text: The article is online and listed in the blog

fields:
  text:
    type: textarea
    size: large

```

**/pages/publication.hdr.yml :**

```auto
title: HDR
icon: 📖

status:
  draft:
    label: Draft
    text: The article is still in draft mode. It can only be seen by editors with panel access.
  unlisted:
    label: In Review
    text: The article is online and can be visited with the direct URL. The team must still give the final go to publish it.
  listed:
    label: Published
    text: The article is online and listed in the blog

fields:
  text:
    type: textarea
    size: large

```

The content folder :

![Capture d’écran du 2023-05-12 10-15-08](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/a/af5f9538ff2542ad3dc32ea311c1b0c59b8c63a5.png)

But when i connect to publication page, i only have one section and not two (HDR, These) why ?

 ![Capture d’écran du 2023-05-12 10-13-33](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/1/121e419a1d79ee4ba0679181e7de12c2eccd7ed7.png)

* * *

**EDIT :**

I found in the starterkit that section injected need to be defined like that

```auto
title: Publications

sections:
  theses: sections/theses
    label: Theses
    status: all

  hdr: sections/hdr
    label: HDR
    status: all

```

But now, i have two messages that say :

- **## Invalid section type (“theses”)**
- **## Invalid section type (“hdr”)**

* * *

**EDIT 2**

If i add directly content of sections into my `publications.yml`, it seems the pages are well detected, so there is problem with my sections/hdr and sections/these definition. Any help @texnixe appreciated because i don’t found where is the syntax error that lead this messages…

```auto
sections:
  theses: sections/theses
  hdr: sections/hdr

  publication_these:
    label: these
    type: pages
    templates: publication_these
    sortBy: date desc

  publication_hdr:
    label: hdr
    type: pages
    templates: publication_hdr
    sortBy: date desc

```

 ![Capture d’écran du 2023-05-12 11-48-14](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/3/302a1d9467762ede62903d4f7e1a9540ba24587a.png)

---

<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:** [May 12, 2023, 10:32am UTC](https://forum.getkirby.com/t/common-and-inherited-blueprints-to-hierarchise-subcategory-of-content/28561/5 "2023-05-12T10:32:37Z")

</div>

> [@reyman](#):
>
> ```auto
> title: Publications
> 
> sections:
> theses: sections/theses
> label: Theses
> status: all
> 
> hdr: sections/hdr
> label: HDR
> status: all
> 
> ```

If you want to change something compared to your original definition, you have to use the `extends` keyword:

```auto
title: Publications

sections:
  theses: 
    extends: sections/theses
    label: Theses
    status: all

  hdr: 
    extends: sections/hdr
    label: HDR
    status: all

```

The problem with your first example was that you cannot use the same key for different sections (fields etc)

---

<div class="post-metadata">

**Author:** ![reyman](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@reyman](https://forum.getkirby.com/u/reyman)\
**Post date:** [May 12, 2023, 12:01pm UTC](https://forum.getkirby.com/t/common-and-inherited-blueprints-to-hierarchise-subcategory-of-content/28561/6 "2023-05-12T12:01:32Z")

</div>

I also try this @texnixe, with and without the extends (_see my 2nd Edit of original post_), but the problem remain (see capture), so i suppose there is something i don’t understand in /sections/ files ?

 ![Capture d’écran du 2023-05-12 13-58-03](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/4/41b7add08309418b4ef9817de6756434ec6911f8.png)

The `sections/these.yml` is defined like that :

```auto
type: pages
label: Theses
parent: kirby.page("publications")
template: publication_these
empty: No articles yet

```

and publication\_these.yml exist in `/page/publication_these.yml`

```auto
title: Thèse
icon: 📖

status:
  draft:
    label: Draft
    text: The article is still in draft mode. It can only be seen by editors with panel access.
  unlisted:
    label: In Review
    text: The article is online and can be visited with the direct URL. The team must still give the final go to publish it.
  listed:
    label: Published
    text: The article is online and listed in the blog

fields:
  text:
    type: textarea
    size: large

```

There is something i don’t understand … why that didn’t work ??
