Import fields sets as blueprint snippet (kirby 2.2)


with the new blueprint snippet feature since kirby version 2.2 blueprint fields can be extended. I’ve tried to extend global field sets but this seems to be not possible:

# site/blueprints/fields/field.set.yml

  label: Titel
  type: text
  label: Description
  type: text

# site/blueprints/default.yml

  extends: field.set
    label: Additional field
    type: text

Is there a way to do that?

Thanks for helping.

that’s not possible but a great idea :slight_smile:


cool, i would be happy to find it in the next release. :slight_smile:

This sounds pretty cool.

Just and idea: Maybe this could also be done by extending a blueprint for a template structure like:

# site/blueprints/

So instead of importing field snippets, it would also be handy to extend the blueprint of a parent/base template. This would mean, that, for example, page.yml would inherit all fields from default.yml and so on. »Child«-blueprints then could override the parent’s fields as well.

What do you think?

That is indeed a cool idea, but I think it is a bit to unflexible because of the nameing convention. Existing kirby sites have to rename their page content files to use that feature.

I also prefer to use my own nameing convention. For examle i have a device page (device.yml) and a device datasheet (device.datasheet.yml). In the datasheet i don´t want to have all fields of the device page. A description field in a datasheet is not useful.

But the inheriting idea is great. What about a new line at the top of a yml file:

# site/blueprint/page.yml

inherit: default
    label: Title
    type: text

The inherit function could also inherit the page and file settings. They could be overitten if needed.


I just wanted to write the same. :smile:
The inherit YAML option is a great idea!

1 Like

Why was the category of this topic changed to solved? Is there already a fix on the develop branch available or something? : )

I guess it was marked as solved because it has been noted as a feature request and there is nothing left to do here.