Add missing cover field to note blueprint and move field to its own blueprint

This commit is contained in:
sonja
2020-12-13 12:30:41 +01:00
committed by Bastian Allgeier
parent 137700c492
commit 89265cd228
3 changed files with 15 additions and 6 deletions

View File

@@ -0,0 +1,9 @@
# Fields can be defined in there own field blueprints
# and reused across multiple blueprints
# This field is used in the album.yml and note.yml blueprints
# See http://getkirby.test/docs/guide/blueprints/extending-blueprints#reusing-and-extending-single-fields
type: files
multiple: false
query: page.images.template('image')
uploads:
template: image

View File

@@ -24,12 +24,9 @@ columns:
# List of all available field types: # List of all available field types:
# https://getkirby.com/docs/reference/panel/fields # https://getkirby.com/docs/reference/panel/fields
fields: fields:
cover: # If you need the same field in multiple locations, you can define them once and reuse whereever needed.
type: files # Here we use a files field defined in `/site/blueprints/field/cover.yml`
multiple: false cover: fields/cover
query: page.images
uploads:
template: image
headline: headline:
type: text type: text
placeholder: "{{ page.title }}" placeholder: "{{ page.title }}"

View File

@@ -38,6 +38,9 @@ columns:
meta: meta:
type: fields type: fields
fields: fields:
# If you need the same field in multiple locations, you can define them once and reuse whereever needed.
# Here we use a files field defined in `/site/blueprints/field/cover.yml`
cover: fields/cover
date: date:
type: date type: date
time: true time: true