Is there a small tutorial for the noobs
Or can we (uhm well not me) write one?
How to use the Global field option.
Step 1) add the folder site/blueprints/fields
Step2) made it to step one so far.
Need some help. For example how to (re)use it in your blueprint, and how to set up the yml file.
This is the basic way of doing it:
Create the folder site/blueprints/fields.
Create a field definition, e.g. a date field in
or an image select field in
label: Select an image
Reference the snippet in your blueprint, e.g.
Or if you want to give your fields another label or change the default, you can extend it like this:
label: Cover Image
Tnx a lot! I just misunderstood the way to call them. This is great!
Are my blueprints supposed to be yaml files? Mine are PHP?
hi, no only your so called blueprint snippets need te be .yml
Blueprints can be both, PHP and YAML, since Kirby 2.2. So no problems here
I think I’d rather make my blueprints YAML because it can get tricky having so many php files with exactly the same name open in Coda.
How can i extends multiple fields instead of single like that:
label: Meta Headings
label: Meta Title
label: Meta Description
label: Meta Keywords
@byybora I don’t think this is available. I’ve tried this, too, but couldn’t get it working.
It would be a nice feature to have, however overriding a single field may be difficult.
@jevets i tried too but couldnt achive
It doesn’t seem to be possible to create a global field definition for a group of fields (e.g. 1 file that defines multiple fields). I understand extending a group would be akward/not possible, but i’m not interested in extending it. The power to add to the global group or make edits to the group which would then be reflected for every blueprint that calls it would be very useful.
Is it possible to define multiple fields in one global field definition file?
I tried and it doesn’t seem to be, but I’m not going to rule out that I did something wrong. I’d like to confirm this with the pros here.
This has been requested before, check out this post:
Well, since Kirby now has
global field definitions, that makes it even easier to include those and even extend them in your blueprints, even if you use the .yml extension instead of .php.
These are great, but I currently miss the option to include groups of fields… not a big issue tho
I also appreciate the global fields and at the same time see a use for global
groups of fields. Would this be hard to implement?