Kirby 2 to Kirby 3 Listing Sub Pages

Hi

I have 4 sites on Kirby I need to update as PHP7.4 support is ending and Kirby 2 will not run on PHP8 (that’s correct I think).

I have run through the upgrade guide for Kirby 2 to Kirby 3. My pages are throwing errors, it’s a really simple site with no plugins, about 4 blueprints, no routing or anything. But mainly, I am trying to get the panel up and running. I haven’t worked with the CMS in ages and I am finding it tough to work out what to do. Any helpers regards the following greatly appreciated.

#1

I have a blueprint mixes.yml, with sub pages based on a blueprint called mix.yml. How do I list the sub-pages (say on the dashboard)?

This is my site.yml:

sections:
  mixes:
    type: pages
    templates:
      - mix
  pages:
    type: pages
    templates:
      - default
      - error
      - home

The pages section works, but I can’t work out how to make the sub-pages show.

This is my mixes.yml:

pages:
  template: mix
files: false
fields:
  title:
    label: Title
    type:  text

This is my mix.yml:

pages: false
files:
  sortable: true
fields:
  title:
    label: Title
    type:  text
  year:
    label: Year
    type:  date
  text:
    label: Text
    type:  textarea
    icon:  file-text-o
  tags:
    label: Tags
    type:  tags

#2

Where do the site fields go in Kirby 3? Do they even exist?

Thank you!

Regards
Mike

I assume what you want to show in the mixes section are the children of a page called mixes? If yes, then you have to define the parent:

mixes:
  parent: site.find('mixes')
  # rest of definition

Without a parent, Kirby will always show the children of the current model, which for the site object would be the first level pages.

Almost missed the second question. If you want to have field in the site.yml, you create a fields section. You can also use tabs to separate stuff.

1 Like

Thank you! I can list the subpages.

I think I get it now, it’s all sinking in, and I am sure I can make the fields work.

Thank you so much for helping me. Much appreciated.

Regards
Mike