I’ve created a default page template with all permissions set to true yet I can’t move a page to a parent page (making it a child page).
I’ve added 2 sections, one for pages and one for subpages in my panel section. I seem to be able to move subpages only to the top level. But I can’t move pages down to make them children of other pages in either of the section. What am I doing wrong?
The server has the right permissions on the folder and yet all the pages (template = default) can’t be moved.
Am I doing something wrong, overlooking an element? I did not find a dedicated documentation or guide explaining what I could do differently for it to work. Or maybe is it normal behavior? Seems weird.
E.g. you want to move a page inside Accueil, then the blueprint of Accueil needs to have a pages section that allows for the template that the page you want to move currently has. Otherwise Kirby will consider that Accueil does not support the template of your current page as child.
My Accueil is the only one that has a specific template.
Other pages have all default template and blueprint. Yet I can’t move pages of default type, with move:true set, in each other.
I don’t see in the page blueprints docs a reference to a settings that needs to be specified for that? It only says move can be either true or false. Or maybe I misunderstood your answer?
Do I need to make it, like I would for changeTemplate for example?
It’s not just about the move permission, but about whether the receiving new parent has a pages section that allows the kind of template the page you want to move has.
Oh really??? I had no idea it was a condition.
I have a section on my site.yml listing pages that are subpages and another sections with parent pages (and edited their title with a query to display the parent title).
I’ll try to add a section dedicated to pages section in default.yml and report back.
Try adding a pages section allowing the template of the page you want to move. I think this is the problem. I also think it’s a shortcoming we should fix. If there are no pages sections at all, any template should be allowed.
I edited the “sidebar” to add one line, a page sections and it works !
I feel stupid now I completely overlooked this info in the pages section docs
But seriously I have extensively searched through the docs, mainly with “children pages”, “child page” and other keywords and did not read any warning specifying that a pages section “enables” the possibilities for pages to add other pages.
I get that it is very “logical” in hindsight when you consider Kirby way of thinking but here is a feedback from a relatively new dev-user (few months, 5 websites built): it is not obvious at all.
The pages sections docs page does not specify it is a conditions, and the move parameter does not mention it. But maybe I am the only one.
The only content refering to that is the first docs paragraph, and I have to admit i did not understand it as a needed condition to solve that issue.
A pages section lists the children of a given parent or a set of pages defined by a query. Pages sections also let you do the following operations (if not forbidden or impossible because of other settings):
Anyway thank you for the tip towards the solution !
Fore reference for anyone stumbling, down here is the updated line:
# default.yml (see entire file above)
- width: 1/4
sections:
# simply adding a default setting for a sections pages allows to add children pages and move pages in the UI of the site.yml panel pages section
pages: true
contentTranslator:
type: content-translator
I have a similar issue in a slightly different context:
There are two page types “events” and “news”
Both can only have child pages of type “note”
I would like to move a “note” page from “event” to “news”
Unfortunately all options for destination parent pages are greyed out. Both “events” and “news” blueprints have the same setup as “notes” from Kirby Starterkit. I.e. both do have multiple pages sections for different page statuses. Any help? Thanks in advance.
Hi @texnixe. Still impressed of your response time – and this since… decades now?
Thanks a lot for your advice. I didn’t expected that movePages or move resp. to default to false.
As you can see further down, I tried adding the options move: true and movePages: true. I added the one and the other first solely and both in the end, because your were mentioning to movePages and Kirby Guide lists to move only. And in the end both. All didn’t help.
So here comes the blueprints:
note.yml:
title: Note
num: date
icon: megaphone
status:
draft:
label: Draft
text: The note is still in draft mode. It can only be seen by editors with panel access.
unlisted:
label: Published
text: The note is online and listed on the overview page but not in Teaser blocks.
listed:
label: Teasered
text: The note is online and listed on the overview and in Teaser blocks.
create:
fields:
- date
status: unlisted
options:
move: true
movePages: true
image:
back: "#FFEE3B"
query: page.cover
tabs:
content:
icon: text
label: Content
columns:
- width: 2/3
fields:
content: fields/content
- width: 1/3
sections:
settings:
type: fields
fields:
fields: fields/page-settings
date:
type: date
time: true
required: true
exclude_teasers:
label: "Exclude from Teasers"
type: toggle
author:
type: users
tags: true
images:
label: Images
type: files
template: image
uploads: image
files:
icon: file
label: Files
sections:
files: true
Sorry, you are right, the option is called move, not movePages, and is actually enabled by default, no idea why it didn’t work at first.
I now copied your code into my 4.7.1 Starterkit, and it works as expected (apart from some missing field definitions in the note blueprint). I can move a page the test page I created around from events to news (and notes), and back from news to events.
Hm, maybe there is something else preventing this. Would you mind sharing your project via PM, so I can take a look?