Multiple files storages - select on files field

Hello everyone!

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?


Yes, it’s called query, see docs: Files | Kirby CMS

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 :sweat_smile:

If I understand correctly my guess is you want different files sections with templates.

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

Can you post your current blueprint for “Dateiablage”?

yes of course, its very simple:

# used as site-wide files storage

title: Sitewide File Storage
icon: image

  status: unlisted

    extends: sections/files
    sortBy: name
    search: true

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.


    extends: sections/files
    label: Branding
    sortBy: name
    search: true
    template: branding

    extends: sections/files
    label: Headerimages
    sortBy: name
    search: true
    template: headerimage