February 14, 2023, 2:15pm
quick question: i want to add the option to have multiple file storages. aka having a page template where the editor can have multiple ‘storages’ for different occasions: branding, headerimages etc.
is there a way to add to the files field a select option, from where the files should be fetched from?
February 14, 2023, 5:26pm
Yes, it’s called query, see docs:
Files | Kirby CMS
February 15, 2023, 8:05am
I am aware of the query. that one only works if you know exactly which page or files section to query. right?
but in my case, i will have multile file storages (pages) with their own file sections. so i would need a way to add a selection to the files field, where the editor can choose which file section they want to query.
i hope i explained my issue well enough
February 15, 2023, 8:28am
If I understand correctly my guess is you want different files sections with templates.
February 15, 2023, 8:33am
yes! so that at the end, there is a more advanced filesystem. multiple ‘folders’ (pages) that hold files, and in the blocks or whereever, you can choose which of these ‘folders’ you want to query
February 15, 2023, 8:38am
Can you post your current blueprint for “Dateiablage”?
February 15, 2023, 8:54am
yes of course, its very simple:
# used as site-wide files storage
title: Sitewide File Storage
February 15, 2023, 1:39pm
I read your initial post again and I’m not sure what your goal is, but you can create multiple files section with different file templates and filter them in your site and page templates.
The files won’t go in different folders, but the template is written in the corresponding .txt file.
This will result in different file sections in the blueprint, so you might label them accordingly.