Cant create subpages

Hey, I am using Kirby3 for the first time, was using Kirby2 before and I like it very much so far :slight_smile:

I am creating a website, where the customer can list brands. The brands are created as subpages. The problem now is that I can’t create subpages in the panel. I can only add existing pages as subpage to the page “brand” but I cant create new ones with the brand-template. I think there is some option missing in my blueprint, but I dont know what exactly?

brand.yml

title: Brand
parent: kirby.page("brands")
type: pages
template: brand
status: all

fields:
    logo:
      type: files
      label: Logo
      multiple: false
    galerie:
      type: structure
      columns:
          images: true

      fields:
          images:
              type: files
        
    text:
      type: textarea

brands.yml

title: Brands
status: all


columns:
  main:
    fields:
      brands:
        type: pages
      bild:
        type: files
        multiple: false

Your brands.yml blueprint only has two fields, but you cannot create new pages with a pages field, you need a pages section. Take a look at the Starterkit (for example the photography and notes blueprints) for guidance. Or the example blueprints in the docs: Samples | Kirby CMS (blog, events).

I see. So having sections is mandatory for that? I will try.
I still find it incredible, that you answer so quickly. I wish you wonderful day.

Yes, without sections, no new pages.

The only alternative, which is still available but which we have removed from the documentation, is using so-called blueprint presets. But their use regarding settings is limited and users have always run into issues with them. So let’s forget them quickly.

So a simple brands.yml with a section for pages and files could look like this:

title: Brands

columns:
  main:
    sections: # pages section
      brands:
        type: pages
  sidebar:
    sections:
      files:
        type: files # files section to upload files

Of course, expanding on these basic settings, you can now add other properties to these sections (layout, templates etc.)

1 Like