DV-JF Posted May 21, 2014 Share Posted May 21, 2014 Hi all, I wonder if it's possible to create a user / role for users witch is allowed to add subpages to a page with a specific template but is NOT allowed to edit the page itself. For example: I want to create a user who can add new articles to a site with template "category". He mustn't be able to edit the page with template "category". Is this possible? Many greets, Jens alias JFDV. Link to comment Share on other sites More sharing options...
totoff Posted May 21, 2014 Share Posted May 21, 2014 Hi Jens, as far as I know a user must have "edit" rights to add subpages. But you may set the parent page (category?) to "locked" in order to prevent editing while it is still possible to add subpages. But maybe a more experienced user knows better. Link to comment Share on other sites More sharing options...
alan Posted May 21, 2014 Share Posted May 21, 2014 Hi Jens, welcome and yes I am certain it is I just don't know if this is the most elegant: I created a second template, for example you could have category and category-children. Then you can assign access to those templates so that a role has edit access to one but not to the other using the usual controls in the Admin (I won't list them here as exploring is a great way to learn + no time right now, but if you get stuck you can post here and I or someone else is sure to help). One thing I do sometimes, not a necessity, is that if I have a pair of templates that are essentially for the same thing (and so I want them to have *identical* fields) and I don't want the bother of maintaining the set of fields in both templates, is make one template use the set of fields from the other. To do this, temporarily set in config.php $config->advanced = true; then create the new template, such as category-children and choose to have no .php template file associated or to copy in any fields, then, when it is created, you can choose that it will mirror the fields of another template, in this case, category. Usually I also set it, once created, to use the same template file as the 'parent' Template. Usually it's good to set $config->advanced = false; back to false after this. I hope that helps, sorry I've not linked to other examples but if stuck some searching here in the forums will reveal more help since there's tons of excellent example code and explanations in here Link to comment Share on other sites More sharing options...
adrian Posted May 21, 2014 Share Posted May 21, 2014 Maybe I am not understanding properly, but in the template Access options you can check "Add Children" while leaving "Edit Pages" unchecked. I do this all the time to allow users to create new articles, but not edit the main article page. 2 Link to comment Share on other sites More sharing options...
alan Posted May 21, 2014 Share Posted May 21, 2014 Tks adrian, that may be a much simpler way, will try that next time I need to do this Link to comment Share on other sites More sharing options...
DV-JF Posted May 26, 2014 Author Share Posted May 26, 2014 Thank you all... Maybe I am not understanding properly, but in the template Access options you can check "Add Children" while leaving "Edit Pages" unchecked. I do this all the time to allow users to create new articles, but not edit the main article page. This was the point I was searching for. I also want to mention, that it is necessary to give the subpage / article page a template with the rights for the editor to edit it. Many greets, Jens. Link to comment Share on other sites More sharing options...
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