kirby-template-hooks
kirby-template-hooks copied to clipboard
Optional input parameter for file update
Should fix #7 Maybe parameters for functions should also be optional, but I'm not sure if they cause any problems.
I need to check again. Because seems that's correct according to the document: https://getkirby.com/docs/reference/plugins/hooks/file-update-before
Yeah, I saw that as well. So I was a bit surprised. Maybe it has something to do with the fact I'm using a custom file blueprint.
Page blueprint
title: Default
fields:
content:
type: layout
fieldsets:
gallery:
name: Sponsors
icon: money
preview: gallery
fields:
images:
label: Sponsors
type: files
query: model.images
multiple: true
layout: cards
size: tiny
empty: No sponsors yet
uploads:
template: sponsor
image:
ratio: 1/1
/site/blueprints/files/sponsor.yml
title: Sponsor image
fields:
link:
type: url
alt:
label: Alternative Text
type: text
accept:
mime: image/*
type: image
Any chance of reproducing the problem?