Hey there,
i just did a fresh install for a kirby site at https://drinkcana.com and I am trying to give site editors the option to manually sort images inside pages, to no success.
Upon inspection I noticed that image templates were using the default.yml instead of image.yml and that their associated .txt file (created when changing image position on the panel) was not recording ‘Sort: X’, only caption.
This was my first attempt at kirby 3, and I feel i might have messed up with the blueprint system somewhere along the line. Any help?
If you use a files section with no template option defined, then the default.yml blueprint is used.
Could you please post the blueprint of the page where files sorting is supposed to happen (including all relevant dependencies like section blueprints etc.)?
title: Campaign
icon: ☎️
status:
draft: true
listed: true
options:
changeSlug: true
delete: true
columns:
- width: 1/2
fields:
text:
label: Text
type: textarea
size: huge
ficha:
label: Acknowledgments
type: textarea
size: large
- width: 1/2
fields:
imageupload:
label: Imagens
type: files
layout: cards
pasting it here changed format and indentations, but i am pretty sure they are correct.
The sorting order is not stored in the meta data file, because imageupload
is a files field, not a files section. If you change the order of the files in the files field, the order in which the filenames are stored in the text file is changed.
The sort order is only added to the meta data file if you use a files section (a files section doesn’t store anything in the page content file).
On the differences between files field and files section: https://getkirby.com/docs/cookbook/setup/kirby-in-a-nutshell#sections-or-fields__files-section-vs-files-field