the page blueprint option “read: false” cand hide pages from the panel but the docs says this will be deprecated. Altough this seems to work, I will prefer to not need to create one blueprint file per each page I need to hide. Is there any config option or solution via code to achieve the same?
If you use the Panel, I would expect that you have a blueprint for each page anyway (or if not, then Kirby will fall back to the default.yml blueprint anyway). Therefore I don’t really understand what you mean here.
And no, there is no config setting. Just general user permissions, or the option to use hooks to prevent access to certain pages for certains roles.
For instance I have a “login”, “signup”, etc pages. Those pages doesn‘t require any panel blueprint definition. Adding one file per each of those pages feels like adding complexity while I was wondering having a setting or something will be “cleaner”.
As I wrote above, options could be using the default blueprint, a route.before hook, not listing those pages in any section in the panel, or page models.
This section lists and describes the options, followed by examples:
This allows you as an admin to see all blueprints and hide them for editors, for example.
# Page is not accessible and not visible for all roles except admins.
options:
access:
*: false
admin: true
list:
*: false
admin: true
I would recommend a separate blueprint for pages like “login” or “setup”, otherwise they will fall back to the “default” blueprint, as Sonja mentioned. And the default blueprint in particular should not be hidden for editors.
Adding one file per each of those pages feels like adding complexity while I was wondering having a setting or something will be “cleaner”
Whether you assign roles to each blueprint or in a hook: a one-off effort is still required. In addition, these settings are only required for blueprints that you want to hide from other users. And therefore not for all blueprints. The effort will be manageable.
Hm, this is not about hiding the blueprints, but the pages, and if you don’t need the default blueprint for anything else (because you have made sure that pages cannot be created with the default blueprint), I think this approach would be totally fine.
But I agree, simple separate blueprints with just the options set are not that much of an extra effort. And if you want to get them out of the way so as not to clutter your blueprints’ folder, you can register them in a plugin.