PWaddict Posted March 30, 2018 Posted March 30, 2018 Module for hiding pages for non-superusers. Download HidePages Requirements ProcessWire 3.x Changelog 1.0.1 (31 March 2018) Module renamed to prevent confusion 1.0.0 (30 March 2018) Initial release 7
kongondo Posted March 30, 2018 Posted March 30, 2018 8 minutes ago, PWaddict said: Module for hiding admin pages for non-superusers. . Hmm, aren't admin pages hidden for non-superusers by default? 1
PWaddict Posted March 30, 2018 Author Posted March 30, 2018 4 minutes ago, kongondo said: . Hmm, aren't admin pages hidden for non-superusers by default? They are still visible. For example I have a hidden page that's used for AJAX on the Shopping Cart page. Even though the status of that page is hidden it's still visible on admin area. With this module I can hide it from the admin navigation by selecting it's template.
kongondo Posted March 30, 2018 Posted March 30, 2018 (edited) 13 minutes ago, PWaddict said: They are still visible. For example I have a hidden page that's used for AJAX on the Shopping Cart page. Even though the status of that page is hidden it's still visible on admin area. With this module I can hide it from the admin navigation by selecting it's template. I get you now. You are not talking about ProcessWire /admin/child/....(i.e. children of Page with ID 2) but hidden pages in general. In that case, the module class name, title and description are misleading IMHO. Maybe change to something else? Edited March 30, 2018 by kongondo 1
PWaddict Posted March 30, 2018 Author Posted March 30, 2018 17 minutes ago, kongondo said: I get you now. You are not talking about ProcessWire /admin/child/....(i.e. children of Page with ID 2) but hidden pages in general. In that case, the module class name, title and description are misleading IMHO. Maybe change to something else? You're right. The module has been updated to 1.0.1. Changelog 1.0.1 (31 March 2018) Module renamed to prevent confusion 2
Ivan Gretsky Posted April 6, 2018 Posted April 6, 2018 Hey @PWaddict! Thanks for the module. Today I found a use case for it. I have a lot of pages with a certain template under root which pollute the Page Tree and make other pages hard to find. They are there for the sake of pretty URL structure. I wanted them to be hidden even for superuser (the one who struggles the most in admin area ), so I removed $this->user->isSuperuser() from the code. I spotted something that looks like a bug and a chance to improve the module. Pagination and the ">More" button still count all the pages, including the hidden ones. Maybe there is a chance to fix it?
kongondo Posted April 6, 2018 Posted April 6, 2018 29 minutes ago, Ivan Gretsky said: so I removed $this->user->isSuperuser() from the code. In that case, it's probably useful to show a PW warning notice for Superusers that some pages are hidden even for them. You might get tired of seeing the warning though :-)...but that can be set to show once per login session I suppose. 2
PWaddict Posted April 6, 2018 Author Posted April 6, 2018 @Ivan Gretsky I'm glad that you're using it. Unfortunately I don't know how to remove the hidden pages from the count. If someone can do it please send me a PR. I do not suggest hiding the pages from the Super user cause it might be annoying if you might need to edit them in the future.
Outward Posted March 27, 2021 Posted March 27, 2021 Thanks for the module PWaddict, very useful for my current use case. I'm building a site with numerous roles, none of which have access to the admin panel as everything is done through the API and front-end editing. I had to enable view access for some templates, so the only 'look-in' to the top level page tree is through a trusted user adding a link in CKEditor fields. It's nice to have a module that focuses simply on the main page tree, so I can still define page reference fields for hidden templates where the role still has view access, and they display fine. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now