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.
title: Site
tabs:
pages:
sections:
pages:
type: pages
templates:
- default
- home
- contact
- blog
subpages:
type: pages
templates:
- default
query: site.pages.children
I created a section to display only subpages and those can’t be moved except to their own parent (useless) or back to the Site (parent level).
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