# Layout with Blocks/Images

**URL:** <https://forum.getkirby.com/t/layout-with-blocks-images/29684>\
**Category:** Questions\
**Created:** [October 6, 2023, 2:31pm UTC](https://forum.getkirby.com/t/layout-with-blocks-images/29684 "2023-10-06T14:31:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lwm](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@lwm](https://forum.getkirby.com/u/lwm)\
**Post date:** [October 6, 2023, 2:31pm UTC](https://forum.getkirby.com/t/layout-with-blocks-images/29684/1 "2023-10-06T14:31:58Z")

</div>

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:

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

```

This is my blueprints/blocks/image.yml

```auto
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

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [October 6, 2023, 2:56pm UTC](https://forum.getkirby.com/t/layout-with-blocks-images/29684/2 "2023-10-06T14:56:18Z")

</div>

You can start here: [Layout | Kirby CMS](https://getkirby.com/docs/reference/panel/fields/layout#how-to-render-layouts-in-templates)

---

<div class="post-metadata">

**Author:** ![lwm](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@lwm](https://forum.getkirby.com/u/lwm)\
**Post date:** [October 6, 2023, 3:36pm UTC](https://forum.getkirby.com/t/layout-with-blocks-images/29684/3 "2023-10-06T15:36:29Z")

</div>

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

🙂
