When I click on images and videos in my panel it takes me through to a page which displays this error. In answer to this, I created a folder called files inside the blueprints folder. Inside I placed a file called video.yml. Inside this I have declared these sections, this has not removed the error message, what is the correct information I need to include inside this file?
sections:
HomeVideo:
headline: Video
type: files
template: video
limit: 20
Is that the complete file blueprint? Why do you set the section in there? A file blueprint can’t have a files section, please read the docs about file blueprints. There is also an example of a file blueprint in the Starterkit. I cannot possibly write a whole new set of docs in here
Hi, thanks for the help once again @texnixe. After looking at the documentation, I have realised I need to the uploads and templates in the page blueprint too. so I have added:
uploads:
template: image
I have then duplicated the image.yml in the starter kit. This error is still there for me.
Okay so this will be a case of reuploading the files… No problem. Here is the full blueprint.
# Each file blueprint must have a title, the title may be different from the file name
title: Image
# Like page blueprints, file blueprints can define a layout with tabs, columns, sections and fields
# File blueprints define what sort of information should get stored in a file's meta data file
# In addition to the fields defined in this example blueprint, you can also set what type of file is acceptable
# when this blueprint is used, which allows you to control what users can upload.
# More about file blueprints: https://getkirby.com/docs/reference/panel/blueprints/file
columns:
- width: 1/2
sections:
content:
type: fields
fields:
caption:
label: Caption
type: textarea
size: medium
- width: 1/2
sections:
meta:
type: fields
fields:
alt:
label: Alternative Text
type: text
photographer:
label: Photogapher
type: text
width: 2/3
license:
label: License
type: select
width: 1/3
options:
- Unsplash
- CC BY 4.0
- CC BY-SA 4.0
- CC BY-NC 4.0
- CC BY-ND 4.0
link:
label: Link
type: url
Not all your file fields have a template assigned. And if you don’t have a default file blueprint, then these files have no fields set up. See the docs.