Can't move some pages

I want to reorganize a website I’m currently working on : www.steveforest.com

I want to move some pages from the root to www.steveforest.com/pathologies/MOVE-HERE

Unfortunately, Kirby won’t let me do that. Tried to edit blueprints with :

site.yml

sections:
  pages:
    type: pages
    templates: 
        - default
        - blog
        - contact
        - full-width
        - home
        - inverse
    subpages:
      type: pages
      templates: 
        - default
        - blog
        - contact
        - full-width
        - home
        - inverse
tabs:
    content:
      fields:
        # your fields
    seo: seo/site    

default.yml and all the other templates as :

options:
  changeTitle: true
  changeSlug: true
  preview: true
  read: true
  changeStatus: true
  update: true
  delete: true
  status: true
  move: true
  rename: true
  duplicate: true

But, all I get is greyed out pages :

Still can’t move these. Anyone knows why? I’m trying to understand the logic behind it but can’t get it…

Thanks.

Steve

Unfortunately, you posted screenshots instead of code, so cannot copy paste here. In future, please always post proper code blocks.

What is this subpages section supposed to be doing in that site.yml, is is weirdly indented under the pages section. Plus, even if It sat correctly, it would be just a copy of the pages section and show exactly the same pages.

In general, moving pages requires that the “receiving” page (pathologies) allows to have pages with the given template. Since I don’t know what the blueprint for that page contains, cannot say more.

Thanks for the help. Haven’t used Kirby for a while and I’m not a programmer, so sorry…

Here is the code of the two blueprints; hope it tells you more…

default.yml (blueprint of the receiving page)

title: Page par défault
icon: 🗒️

options:
  changeTitle: true
  changeSlug: true
  preview: true
  read: true
  changeStatus: true
  update: true
  delete: true
  status: true
  move: true
  rename: true
  duplicate: true

tabs:
  page:
    columns:
      main:
        width: 2/3
        sections:
          fields:
            type: fields
            fields:
              text:
                label: Contenu
                type: blocks
                fieldsets:
                  text:
                    label: Texte
                    type: group
                    fieldsets:
                      - heading
                      - text
                      - list
                      - table
                      - card
                      - line
                  media:
                    label: Médias
                    type: group
                    fieldsets:
                      - image
                      - video
                  code:
                    label: Code
                    type: group
                    open: false
                    fieldsets:
                      - code
                      - markdown
      sidebar:
        width: 1/3
        sections:
          pages:
            type: pages
            template: default
            label: Pages
          files:
            type: files
            label: Fichiers
          image:
            type: files
            label: Image principale
            max: 1
          modules: true
  seo:
    extends: seo/page
    columns:
      main:
        fields:
          metaDescription:
            label: meta-description
            type: info
            text: Will be filled automatically from the field `summary`

full-width.yml (blueprint of the donor)

title: Pleine largeur
icon: 🗒️

options:
  changeTitle: true
  changeSlug: true
  preview: true
  read: true
  changeStatus: true
  update: true
  delete: true
  status: true
  move: true
  rename: true
  duplicate: true

tabs:
  page:
    columns:
      main:
        width: 2/3
        sections:
          fields:
            type: fields
            fields:
              text:
                label: Contenu
                type: blocks
                fieldsets:
                  text:
                    label: Texte
                    type: group
                    fieldsets:
                      - heading
                      - text
                      - list
                      - table
                      - card
                      - line
                  media:
                    label: Médias
                    type: group
                    fieldsets:
                      - image
                      - video
                  code:
                    label: Code
                    type: group
                    open: false
                    fieldsets:
                      - code
                      - markdown
      sidebar:
        width: 1/3
        sections:
          pages:
            type: pages
            template: default
            label: Pages
          files:
            type: files
            label: Fichiers
          image:
            type: files
            label: Image principale
            max: 1
          modules: true
  seo:
    extends: seo/page
    columns:
      main:
        fields:
          metaDescription:
            label: meta-description
            type: info
            text: Will be filled automatically from the field `summary`

Ok, if I understand this correctly, the receiving page only accepts pages that use the default blueprint (there is only one section in default.yml). From the above it is not clear which template the page you want to move uses, also default or full-width?

To give you an example using the Starterkit.

Say you want to move one of the notes children which use the note template to the photography parent, you would have to make the album section blueprint to accept also the note template. It currently looks like this:

/site/blueprints/sections/albums.yml

type: pages
label: Photography
parent: kirby.page("photography")
size: small
info: "{{ page.images.count }} image(s)"
layout: cards
templates: album
empty: No albums yet
image:
  query: page.cover
  cover: true
  ratio: 5/4

and you would have to change the template option to

type: pages
label: Photography
parent: kirby.page("photography")
size: small
info: "{{ page.images.count }} image(s)"
layout: cards
templates:
  - album
  - note
empty: No albums yet
image:
  query: page.cover
  cover: true
  ratio: 5/4

After that change and a page reload, you would be able to move a note to photography

1 Like

Thanks for bringing me back to the Starterkit :slight_smile: As you can read, I’m a total beginner with Kirby and I’m not used to be able to control pretty much everything!! I’ll go back to the doc and read about sections. Thanks again!

Got it working! If it can help someone, here’s what I did :

  • Use ChatGPT to clean up all my blueprints, is does an amazing job;
  • Took the time to read and understand what ChatGPT did.

The solution ended up to fix pages blueprints to make sure all these (all these that you want to be able to move around) have :

templates: 
 - default
 - full-width
 - inverse

I’ll continue to learn Kirby step by step :slight_smile: