We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33124
    • 2 Posts
    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?
      • 28042 ☆ 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
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 33124
        • 2 Posts
        I need this for Revo v.2.0.4

        Are there any other options? maybe out of the box?

        Thanks!
          • 3749
          • 24,544 Posts
          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).
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting