Layout with Blocks/Images

Hey, I am a little lost for a few hours and can not get any further with this: I need to create a layout where the client can either display one or two images in a row. My current approach is to use Layout:

gallery:
    type: layout
    layouts:
      - "1/1"
      - "1/2, 1/2"
    fieldsets:
      - image

This is my blueprints/blocks/image.yml

name: field.blocks.image.name
icon: image
preview: image
fields:
  image:
    type: files
    multiple: false

I can now decide if a row should be one or two column and insert images for each column.

In the frontend, how can I now output and style everything? The rows with two images should be displayed as a two column grid, the rows with one image just as one.

Thanks so much for any help!

All best
L

You can start here: Layout | Kirby CMS

1 Like

That worked pretty well, thanks a lot! Somehow I must have missed that section.

:slight_smile: