Skip to content

Kirby 3.7.0.2

Files

The files preset is intended for pages that only contain files and no additional content.

Do not use presets for new projects. Presets will be deprecated in future versions of Kirby.

Basic setup

A basic blueprint with a files preset creates an empty files upload section:

Title: Files preset example
preset: files

Empty

Filled

This basic blueprint can be extended in many ways.

Options

Label

title: Gallery section
preset: files
label: Image gallery

Template

You can set the template option to filter files and define the template that is assigned to each uploaded file.

title: Gallery section
preset: files
template: image

Layout

Like in any other files section, you can choose between list and card layout:

title: Gallery section
preset: files
layout: cards

Image

title: Gallery section
preset: files
layout: cards
image:
  cover: true
  ratio: 1/1
  back: black

Usage in tabs

All presets can also be used within tabs as the following example shows.

title: Trip
icon: ✈

tabs:
  details:
    label: Details
    preset: page
    fields:
      intro:
        label: Intro
        type: textarea
  gallery:
    label: Gallery
    preset: files