Is there any way to hide the Contextual View Modes Settings box that's attached to a content type from logged in users other than the admin? I have tried hiding it using field permissions but can only stop the editing or creating of new CVMs and the box still appears showing the Enabled Global Contextual View Modes.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | contextual_view_modes-permissions-1978356.patch | 511 bytes | Helrunar |
Comments
Comment #1
rickdrup commentedFor anyone else that may want to do this, I'm not sure what the "correct" approach is but as I can't seem to hide the vertical tab for CVMs using permissions, I have just used a simple CSS rule to hide the field.
Comment #2
rickdrup commentedAfter having tried a few modules and various other CSS rules to stop the CVM vertical tab from being visible by logged in users but still visible and editable by the admin I had to resort to placing the following in template.php:
The issue seems to be that the permissions for this field do not work properly and all users can view the field despite the permissions not allowing them.
Comment #3
davidneedhamThanks @rickdrup. This solution works for me too.
To fix for realz, we'll need to patch into the module's code rather than the theme, but this is a quick fix.
Comment #4
Helrunar commentedHere is a small patch, that will fix the problem and will make the permissions get work correctly
Comment #5
rrrob commented#4 Works perfect.
Comment #6
alauddin commented#4 works - tested with 7.x-1.2-alpha1+9-dev
Comment #7
sherakama commentedCommitted to latest dev. http://drupalcode.org/project/contextual_view_modes.git/shortlog/refs/he...
Thanks.