Images next to paragraphs

Hi everyone,

I have question about the layout after posting blog

is there a possibility to change the layout in to this? (red marked is what i wanted too look like)

Instead of all the pictures below the post, i just wanted to have like at least 1 image next to the paragraph, or description.

I would be very grateful for any advice or help.

Thank you!

If you only store images in your files section you could do something like this: $page->files()->first() or loop through an array of files and limit it $page->myfield()->toFiles()->limit(1)

Isn’t there an option like , when you are creating the blog, to choose the layout that you want ?

like 1/2 or 1/3 ??

The layout on the frontend is up to you. You can create anything you like with HTML and CSS.

For the panel you can do that within blueprints:

For the front-end it’s up to you :wink: Have a look at css grid here

Well i know it, but i meant isn’t there like possibility when you create blog, to make like options to choose layout automatically so it adjust by itself

You can set up options in the Panel and then create templates that respect those options, but the templates won’t adapt magically unless you make them so.

Or check if there are themes that already implement such options if you don’t want to create stuff yourself.

Thank you all for helpful answers.

Well i know that, but I am just working with kirby like a week or so, and Im not that advanced to do it myself. I mean in the panel.

I would use a radio or toggle field inside your blueprint and then a simple if statement in your template.

  type: radio
  columns: 2
    classic: "Classic"
    modern: "Modern"

<?php if($page->layout() == "classic"): ?>
<?php elseif($page->layout() == "modern"): ?>
<?php endif ?>
1 Like