Tree-like page grouping custom field?

Hi,

I recall seeing someone either asking for or showcasing a way to ‘group’ pages (or perhaps it was structure items) in a manner that allowed for draging and dropping pages among the groups.

Visual aid:

group A
  page 1
  page 4
group B
  page 3
group C
  page 2
page 5

…any of those pages could be drag’n’dropped among the different groups, and even outside of all groups, as page 5 in the example above.

Does this actually exist ? workaround ?

Thanks

I’m not aware of such a plugin.

You could use a layout field with two types of blocks (heading and page selector, where page selector is a pages field where you can select max 1 page) as a workaround to create such a structure.

  layout:
    label: Layout
    type: layout
    fieldsets:
      - heading
      page:
        name: Page
        icon: bolt
        fields:
          page:
            type: pages
            query: site.index
            max: 1

Thanks,

That’s a nice workaround.

My layout field seems to render differently than what you show here. In particular the discontinuous line between Group 1 and next two pages. But also the blue check.

This is a 3.5.6 installation, are those differences reated to version ?

Thank you

The blue checkmark has nothing to do with Kirby but comes from my LanguageTool browser extension (sorry for the confusion).

In my example, I used a layout item per group

1 Like