Jump to content

Prevent admin user from creating child pages?


Patrik
 Share

Recommended Posts

Hi all,

I'm new to processwire and trying to figure out if it's suitable for an upcoming project.

One thing I'm wondering is if it's possible to prevent an admin user to create child pages for a certain page. Let's say I don't want anyone else but me (superadmin) to be able to create another page as a child to the home page. I want my main nav to have a set numbers of pages.

I was looking into roles and permissions but couldn't find a way to do it from there. Am I missing something?

All help and advice are appreciated.

Thanks.

Link to comment
Share on other sites

Never mind, think I found a solution.

For anyone else having the same issue. Go to Setup > Templates. Choose a template, and then under family you can select Yes/no for "may pages using this template have children". There's also another option, "Can this template be used for new pages?".

Brilliant!



@renobird > Just found a way myself, as you can see. But your suggestion is yet another way to do it. Perfect.

Thanks!

  • Like 2
Link to comment
Share on other sites

If you use the template aproach the user could then reenable the option to create children, so limiting it via roles is the safer route.

Most of the time a non-superuser wouldn't have access to template settings, so they shouldn't be able to re-enable that option. 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...