tags:

views:

314

answers:

3

How do I hide the content resource field from non-admin users?

+1  A: 

So you'd like a user to be able to change document fields such as title, alias etc but not the content?

You can not lock individual fields to admin user (as far as I know). You can either lock the whole page/resource or you could put the content that you want to be locked into the template for that document and lock the template to only the admin user which would achieve the same effect.

Make sure you don't have a reference to [+content+] in the template and even if the user enters document content it won't impact the page.

Fishcake
+1  A: 

New answer instead of editing the above as this is a much cleaner solution.

  1. Create different user groups eg. Admin & Editor
  2. Make sure admin is in the admin user group
  3. Create a template variable for your content and in the Access Permissions section only tick the admin group.
  4. Assign the TV to your template.

Now if the user isn't in the admin user group the TV won't even be visible when they are editing the resource.

Fishcake
+1  A: 

Hey, thanks for the answer. I thought I'd post what I ended up doing.

With MODx Evo 1+, you have managermanager included. After removing the included file(which is used rather than the default chunk) using the rules in there I can rename hide and sync content.

Daniel
Just had a poke around with the mm files and it looks interesting. Well I've learnt something new today and it's only 9am, nice work.
Fishcake
Did you get this to work? I can hide any field but except Content and can't work out why.
Fishcake
Sorry for the delay, I missed the comment.I used:**mm_hideFields('content','',$tpl_id);**
Daniel