plain-solutions-gmbh / kirby-column-blocks

Use columns in block fields based on the layout field.
MIT License
35 stars 0 forks source link

"Row-Template" with predefined block types #2

Closed teichsta closed 1 year ago

teichsta commented 1 year ago

Hi @youngcut and thanks for this great plugin,

is it possible to provide "custom columsets" with predefined blocks?

What i'd like to achieve is use this columns block to "simulate" a small gallery or kind of "row templates" like 1/3 + 2/3 with small text and a big image block predefined already to reduce clicks for the user if that makes sense to you.

I am wondering if that is possible and i would achieve that with your plugin.

Thanks in advance, Thomas E.-E.

plain-solutions-gmbh commented 1 year ago

Hi Thomas As i understood right, you want a column block with a specific setting (1/3 - 2/3) with abbelity to add only a set of blocks. These could be done easly by adding this to your blueprint:


fields:
  myblock:
    label: Block content
    type: blocks
    fieldsets:
      - heading
      - text
      columns:
        extends: blocks/columns
        fields:
          layout:
            layouts:
              - "1/3, 2/3"
            fieldsets:
              - image
              - text
teichsta commented 1 year ago

Hi Roman,

thanks for your reply!

No, not quite. The columns should already be filled with a given set of blocks. For a "gallery" i'd like to prepare a gallery-3x1-column with 3 columns and 3 image blocks already filled in.

plain-solutions-gmbh commented 1 year ago

I think, this can be achieved by using the default property. But these are more questions about block fields in general. Please ask further questions to the Kirby Forum.