Can I hide the error page in the panel?

Use error page as template instead

In the panel there is an error page. I prefer to let the template handle that page without the panel. Is it possible?

Delete error folder throws errors, use routes?

If I delete the folder I get strange errors. Can I route it somehow without breaking the rest of the site?

Hm, unfortunately I didn’t quite understand what you mean.

Whether you’ll consider this a definitive enough solution I’m not sure, but in /assets/css/custom-panel.css add…

.nav > li > [data-helper="Error"] {display:none;}

There remains an empty list item element, but it should just collapse and not be visible. Alas if you could target a parent element in CSS.

1 Like

That worked. Good enough for me at this point.

Suggestion

hide_this_page: true

or something in the blueprint to hide this page.

I’m fairly sure I’ve shared the code to do just that on these forums already, but it involves modifying the core. I’ll see if I can track down the link.

Link found.

I don’t think it’s worth modifying the core just to hide the error page.

But in general I’m very much in favor of a “hide” option for specific pages/templates similar to the subpages setting.

2 Likes

Wanted to bump up this topic. Having this listed as a “page” in the panel is confusing. I suggest moving it’s contents to Site Options, or some other way to remove it as content. Confusing to client.

@louiswalch That’s a good idea, it moves the page out of the way why still leaving it’s contents editable if required.:+1: The template for the page could be called via a route.

1 Like

I think it should still be a page in the content directory (for backwards compatibility and because it is a page), but maybe the error page (error or as defined by the error option) could be displayed by the Panel in a special view somewhere in the site options and hidden from the pages list.

In some matters it can be seen as a page. In other cases it can not.

Error is a page

  • Because it is placed in the content folder
  • Because it has a template
  • Because you can go to it with the url /error
  • Because it can be reached by the panel

Error is not a page

  • Because it’s a global thing. Everything that don’t match another page will have the error page. That way the error page is not just /error, it’s everything, except the other valid pages.
  • Because it’s not an valid info page. It have status 404 and is not supposed to be visited (in a perfect world)

There are more list items that tells us that error is a page but I still think it’s something in between. I would want it separated from the “normal” pages.

1 Like

I fully agree. While it isn’t a normal page, it is still a page, but a special page even more than home. That’s why I think it should be moved to a special view in the Panel.

2 Likes

uhm and in dropzones, you can do ?

.dropzone.subpages #error { display: none; }

Well it´s a problem with that and that is it still counts the “error” page as (1) !


Any solution for this? I need to hide certain pages to the client as they just confuse him… hope on the feature.
Thanks

Yes, you finally can with the option:

hide: true

(since Kirby 2.3.0)
https://getkirby.com/docs/panel/blueprints/page-settings#hide-page

Edit: You would have to create a separate blueprint for the error page.

2 Likes

Hello,

unfortunately “hide: true” does not work for me.
I use Kirby 2.3.2 and created a seperate blueprint.
I know that the correct blueprint is loaded because i set the icon to suitcase.

Does anyone is facing the same issue?
Best, Sven


can you try to put hide inside the options?

options:
  hide: true
  ....

Edit: don’t think that’d work. I’m not sure why it’s not working for you sorry. Have you tried removing everything else (options and icon) and removing the empty spaces?

1 Like

unfortunately yes :frowning:

Can you try creating a dead simple blueprint and a test page to see if works?

title: Hide test
hide: true
fields:
  title:
    label: Title
    type: text
1 Like

Can’t test right now, but I remember being puzzled by an interaction between some options. Like, if delete or status is set to true, does it work?

@zvaehn: next time, could you post your code as code blocks instead of a screenshot, please, it makes it a whole lot easier to test your code and correct it if necessary. Thank you!

Edit: Apart from that, I can’t reproduce your issue, not even with all those options set.