How to "nest" sections in blueprints?

Is it possible to “nest” sections in Kirby 3 blueprints?

I have 1 blueprint and and I’m trying to tidy the sections in it by grouping them together. But I’m stuck and I’m getting errors (Cannot use a scalar value as an array).

Basically what i’m trying to achieve:

title: Some page

tabs:

  content:
    label: Content
    icon: text
    sections:

      hero:
        type: fields
        fields:
          Herotitle:
            label: Hero title
            type: text
            required: true
          Herobgimage:
            label: Hero background image
            type: files
            layout: cards
            size: small
            multiple: false
            width: 1/4
            required: true
          Herotext:
            label: Hero text
            type: textarea
            width: 3/4
            required: true
      
      secondsection:
        type: fields
        fields:
          somedemofielda:
            label: Demo field A
            type: text
          somedemofieldb:
            label: Demo field B
            type: textarea
      
      thirdsection:
        type: fields
        fields:
          somedemofieldc:
            label: Demo field C
            type: text
          somedemofieldb:
            label: Demo field D
            type: textarea


  seo:
    label: SEO metadata
    icon: search
    sections:
      seo:
        extends: sections/seo-meta


  files:
    label: Files
    icon: 🗃
    sections:
      files:
        type: files

And bonus points for showing me how I can setup columns in those sections :slight_smile:

Thx!

AFAIK you can nest sections.

You also can’t nest columns, but columns are in fact more like grid cells in that they stack.
Sections go in columns, not the other way around.

If you want to visually group fields in the panel, @hdodov made a plugin for that.

2 Likes

Woops, first line was supposed to be “can’t nest sections.” But you probably guessed it.

Hehe, yes I did.

FFR I decided to not use hdodov’s plugin as it probably would imply template changes too. Adding a plugin (with the risk of having bugs on upgrades), and necessary template changes, only for “cleaner layout” in the panel wasn’t worth it for me (for now).