Can't hide page in Panel

I have created an extra API page with a custom blueprint and template. For some reason I’m not able to hide it in the panel. Any idea what might cause this? Is there a global option somewhere overriding this?

I also can’t hide the error page with a custom blueprint it seems. Must be related.

This is a bug that has been fixed on the Panel develop branch on GitHub. Check it out.

Hiding single pages should actually be possible in the master version. As far as I know, it’s hiding subpages that’s broken in 2.4.1, but fixed on the development branch.

So if you add

hide: true

in the error blueprint, this should hide the page from the panel, at least it does in my test installations.

Note that this setting should be unindented.

1 Like
title: Error
hide: true
pages: false
files: false
  preview: false
  url: false
  status: false
  template: false
    label: Title
    type:  text

Here is my blueprint file. Unfortunately the error page is still visible in the panel with this.

I’m not sure about the right syntax at the moment, but have you tried to move the hide option to the options section?

  hide: true

@rbnschlz has the correct syntax, @flokosiol. I just tested on v2.4.1 and it works just fine.

@rbnschlz are you running the latest version? Can you test your blueprint on a fresh installation?

1 Like

just tested on a fresh install (of shopkit) and it works fine. running the latest version of everything on my current project. any idea what the mistake could be?

Have you checked if the Error blueprint file name on your current project matches the page content file name?

And matching also means to make sure that you are not using capital letters in file or folder names. If your text file is called Error.txt and your blueprint error.yml, they will not match (at least not on a Unix-like system).

1 Like

Yes, checked the naming as well: error.en.txt and error.yml. Same for the api page.

Are you on a multilanguage or single language installation?

I am using shopkit, so I think it’s a multi language installation. However, I am not using multiple languages, but only one for the content.

Hm, if it works in a fresh shopkit installation but not in yours, then I wonder what you might have changed?

I do too. As far as I’m aware I haven’t touched any of the original files. I might just move all my custom work to a fresh install later. For now there is other stuff to worry about.

Thanks anyways!

I’m experiencing this very strange problem, as well… It’s probably something stupid I’m doing, but I can’t work it out. Help!

Using Kirby 2.5.5. I have a page titled ‘Forgot Password’, which I don’t need to show up on the Panel. So, I’ve created a blueprint for it, titled ‘forgotpwd.yml’, that looks like this:

title: Forgot Password
deletable: false
pages: false
files: false
icon: key
hide: true
    label: Title
    type:  text
    default: Forgot Password
    label: Text
    type:  textarea

Note that it has hide: true at the top.

There is a content file for the page, which is titled ‘forgotpwd.txt’.

Title: Forgot Password
Text: sample text.

Unfortunately, the ‘Forgot Password’ page still shows up in the Panel!

Now, here is the interesting part: in the _‘site.yml’ blueprint for this site, I normally have pages: false, as I don’t want the user to add any top-level pages to the site:

title: Site
pages: false
  sortable: true

If, however, I set pages: true, then the Forgot Password pages disappears (hides), as it should! Of course, I can’t work with that, because that means that the user will be able to edit/manage pages again…

Turning pages: false, makes the Forgot Password page appear again!..

What am I missing? Help!

I can reproduce this. Instead of setting pages to false, you could set a max. no. of pages and disallow deletion of subpages.

Something is not as it should be, I think, although I’m not so sure what the bug is: the fact that hide does not work or the fact that any pages are shown in the widget. Somehow setting pages: false does not appear to be the right setting to achieve what you want, though.

I created an issue on GitHub:

@texnixe thank you for the quick feedback - it’s reassuring to know I wasn’t going crazy! :slight_smile:

I agree, that setting pages: false in the site.yml blueprint should probably not be the recommended practice - it is not coherent with how it should work everywhere else in the Panel. However, having a single setting at parent-level that can easily disable adding/deleting and editing of all sub-pages is gold. We should add that as a feature request.

The site in question has 10 top-level pages. Not using pages: false means changing several settings in 10 different blueprints, as well as on site.yml itself. So, pages: false suddenly starts looking like a very elegant solution…

This is, indeed, a very common use-case - and not just at top-level. Consider, for instance, when we have landing pages, with sub-pages that represent sections, and which we don’t want the user to be able to add/delete or edit the order. Being able to fully disable all sub-page editing options, while still showing the list of sub-pages, is what is required.

Perhaps we could add a new list setting for pages? That would be wonderful!

Once again, many thanks for the guidance, and for adding the bug report - truly appreciated. You guys are awesome! :+1:

This can be achieved with permissions on a per user role. On a per template base, you can also set the update option to false. Might not be as quick and dirty as the pages: false setting, but just trying to point out some options, considering that your easy way does not exist (yet).

Thank you so much for your help, @texnixe - you are amazing.

I’ve tried all these solutions before, and where they all seem to come up short is that none of them lets the user edit the page content, without being able to also edit the page ORDER. We either have to allow them to edit the page content and order, or we have to lock them out of editing the page altogether. You can see this by the fact that it is possible to remove the ‘Add’ button, but not the ‘Edit’ button from the ‘Pages’ sidebar in the Panel. What we really need is an option that would remove both buttons…