Sections vs. fields | Can I use a files section within a fields section or structure field?


Just quickly: in the docs it says to use “label” to label the info-field, however it was actually “headline” I had to use to label the info-field. Maybe it’s a typo in the docs, or it’s just my installation.


No, label is the correct property for an info field, headline won’t work, or will only display the name of the field.

Sure you’re using a field, not an info section?

info field: label (like all fields)
info section: headline (like all sections)

If you don’t set a label for a field/headline for a section, the field name/section name is used instead.

1 Like

Ahhhh! Thanks for the clarification! I’ll withdraw my statement.

But since you’re here, another quick question: :smiley:
Is it possible to have not a file-selection-box in a structured field, but a file-upload-box? Like the one shown in the second screenshot.

        type: fields
            label: Mitglied bei
            type: structure
                label: Text
                type: textarea
                counter: false
                buttons: false
                label: Logo
                layout: cards
                type: files
                size: small
                template: image
                max: 1

No, you can’t have sections within fields. It wouldn’t make sense anyway, because sections don’t store anything in your content files.

I agree that it could be of advantage to be able to upload an image directly from the files section, but just like we don’t have files sections that can upload to different pages, this would have some downsides, as images might come from different sources.

1 Like

Yeah, makes sense, thanks!
So I guess the only solution is to have a file section and then chose the structure-image from there?

Yes, of course there are certain downsides to the workflow if a missing image has to be uploaded first, but it’s not as bad as in Kirby 2 anymore, where you had to close the modal first.

1 Like

Should I change the title of this thread to relate to the second question?