Zeka Posted August 10, 2017 Posted August 10, 2017 Hi! I need to restrict page tree to two branches of pages under homepage. And I don't want to show not editable pages for a user in page tree. What is the right way to do that?
Gideon So Posted August 10, 2017 Posted August 10, 2017 Hi Zeka, Take a look of this amazing module which does the job for you. http://modules.processwire.com/modules/admin-restrict-branch/ Gideon 1
Zeka Posted August 10, 2017 Author Posted August 10, 2017 Hi @Gideon So Thank you for the reply. I have seen this module, but from the description, it looks like it's possible to restrict page tree to only one branch. Am I mistaken?
adrian Posted August 10, 2017 Posted August 10, 2017 @Zeka - that's correct - it is only for one branch. To restrict to more than one is a more complex task. Here are a couple of gists that will get you going: https://gist.github.com/adrianbj/e391e2e343c5620d0720 https://gist.github.com/adrianbj/6fd1b770d9ce7a7252b6 Remember there are lots of things that AdminRestrictBranch takes cares of that you will need to consider like adjusting breadcrumbs, admin search results, the Pages > Tree menu, etc if you choose to start with one of these gists. The biggest issue with the "HideUneditablePages" gist module is if an editable page has an uneditable parent - how should that be handled? Anyway, hope one of them gets you going. This is the thread that led to those gist modules: 3
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