Prevent client from reordering, renaming or changing status of pages in Panel

Is it possible to prevent client, in the Panel, from reordering, renaming, duplicating or changing the status of pages?

In the Panel, on the Site page, I just want a list of the listed pages. That is locked down and can’t be messed with.

In my Site Blueprint I have a Pages Section with sortable: false. This prevents client from dragging and dropping the pages into a different order. But does not prevent client from clicking green circle and selecting a position.


No, these settings are controller by either user role permissions or page blueprint permissions, not by the section itself.

You can either:

  • Hide the menu via CSS
  • Create a custom section

I’ve done a search on the Kirby website for “page blueprint permissions”. I found this Page blueprint | Kirby CMS Is this what I need?

My Site Blueprint now looks like this:

title: Site

options:
  changeTitle: false  

sections:
  listed:
    type: pages
    status: listed
    image: icon
      options:
        sortable: false
        changestatus: false
        duplicate: false
        move: false
        sort: false

But it’s not preventing the Panel options I want it to. In fact there seems to be more options in the Panel:

Or what is a “custom section” and how do I create one? I can’t find any mention of a custom section on the Kirby website. I presume this is custom section on a Blueprint file, that would simply allow me to list the main pages of the website without allowing the client to change anything?

No, those options are not available on the section level, that’s what I tried to say above.

Custom section means that you would have to create a plugin and extend the default pages section, which would mean code something.

So what do these options do if not stop pages from being sortable, change status, duplicated, moved or sorted?

Sounds like I need to look into “user role permissions”. Thanks

Well, you can use these options on the level of the page blueprint, not inside a section. But then this will apply to any section with these pages, not only this one section. Same if you use permissions, you cannot just apply them to a single section.

Sounds promising. So can I use these options on my Site Blueprint to stop client from messing things up? On the whole Site Panel page, not just a section of the site Panel? Or if I apply this to the Site page blueprint will it apply to all pages of the website?

No, you can only use these settings in page blueprints, and they only apply to the pages which use this blueprint.

The site object itself cannot be ordered, renamed or its status changed, it’s not a page.

Okay, I think I’m going to give up and hope the client doesn’t get click happy!

Any idea why I can’t get some text fields to display in the Panel under the listed pages? Here’s my Site Blueprint code.:

title: Site

sections:
	listed:
		type: pages
		status: listed
		image: icon

	fields:
  	first-term:
    	label: First term dates
    	type: text
  	second-term:
    	label: Second term dates
    	type: text
  	third-term:
    	label: Third term dates
    	type: text

Two issues:

  1. The field names themselves, no hyphens
  2. You need an extra fields section.

Thanks. Still can’t get it to work

title: Site

sections:
	listed:
		type: pages
		status: listed
		image: icon

sections:
	content:
		type: fields
		fields:
			first term:
				label: First term dates
				type: text
			second term:
				label: Second term dates
				type: text
			third term:
				label: Third term dates
				type: text

If I remove either section it works, but I can’t seem to have two sections:

title: Site

sections:
	listed:
		type: pages
		status: listed
		image: icon


sections:
	content:
		type: fields
		fields:
			firstterm:
				label: First term dates
				type: text
			secondterm:
				label: Second term dates
				type: text
			thirdterm:
				label: Third term dates
				type: text

This doesn’t work either

title: Site

sections:
	content:
		type: pages
			status: listed
			image: icon


sections:
	content:
		type: fields
		fields:
			firstterm:
				label: First term dates
				type: text
			secondterm:
				label: Second term dates
				type: text
			thirdterm:
				label: Third term dates
				type: text

You can only ever use the same key once, so

title: Site

sections:
  listed:
    type: pages
    status: listed
    image: icon
  content:
    type: fields
    fields:
      # fields here
1 Like

Brilliant!!! It’s worked

What does “You can only ever use the same key once” mean? I thought we could use multiple sections?

Actually, if I remove the section it no longer works. Why do I need one section, but multiple sections don’t work?

Yes, but not with the same name. So yes:

sections:
  section_a:
    ## stuff
  section_b:
    # stuff

NO:

sections:
  section_a:
    ## stuff
  section_a:
    # stuff

Same with tab names, column names, field names.

These are the basics, you might read up on again.

I don’t think I need sections for such a simple Blueprint, but I can’t get it to work:

title: Site

listed:
	type: pages
	status: listed
	image: icon
	label: Main pages

fields:
	firstterm:
		label: First term dates
		type: text
	secondterm:
		label: Second term dates
		type: text
	thirdterm:
		label: Third term dates
		type: text

I provided the solution above, now you have removed the sections again…

Given it’s such a simply Blueprint do I need any sections at all?

If I tell you that you need sections, why do you question it?

Urm okay so I need one section to get it to work? If everything is in one section, then why do I need a section?