Hey @ all,
is there a way to modify the list of templates when i create or update a resource?
example:
I have a resource based on template "references". All child resources of this resource should be based on the template "references-item". But when an editor creates a new child resource he can chose one of ALL templates.
Can i limit this?
-
☆ A M B ☆
- 24,524 Posts
Depending on your version of MODx, if you’re using Evo you can configure the InheritTemplate plugin to use the "first sibling" resource’s template automatically, then in ManagerManager hide the template field altogether.
Or use the TemplateRules plugin
http://modxcms.com/forums/index.php/topic,38684.0.html
I need this for Revo v.2.0.4
Are there any other options? maybe out of the box?
Thanks!
I don’t know if anyone has tried it, but in theory, you can put the other templates in a category, then go to Security->Access Controls->User Groups tab and update the Administrator group. On the Element Category Access tab, add an ACL entry for that category with a context of mgr, a minimum role of admin Super User, and a policy of element.
As long as the other users are either not members of the Administrator group or have roles in it other than admin Super User, they shouldn’t see those options (again -- in theory -- I don’t know if that security check has been implemented for templates shown in the drop-down).