We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28519
    • 6 Posts
    I have set up a user on MODx who will be able to use one template only when creating a document. I have managed to limit template acesss using the ManagerManager plugin. Is it possible to auto-select a particular template so that user does not have to choose it? I.e. I want myTemplateName to appear rather than Please choose a template.

    Thanks

    Steve
      • 28519
      • 6 Posts
      I have added a link to the welcome page to create a new document. This user’s skin is different form others, so other users will not see the link.

      http://www.mysite.com/manager/index.php?a=4&pid=422&tid=46

      Then I modified the Inherit Parent Template to pick up the Template Id part (tid=46) of the URL

      if(($_REQUEST[’tid’] > 0) && ($id == 0)) {
      $content[’template’] = $_REQUEST[’tid’];
      }

      So the template now defaults to the one I want when the user clicks this link. It won’t happen if the user creates a document using the normal buttons though.
      • 3 years later, I stumbled across this. In Revo, you have the ability to have hierarchical configurations. So the System Settings are used by default, then you've got contextual settings, and finally, you have per-user settings. So in Revo, you could go to Security --> Manage Users, edit a user, head over to the "Settings" tab, and create a new setting and value for "default_template". This would override the System Setting when that user is logged into the manager.
          • 42562
          • 1,145 Posts
          Yea, three enthusiastic thumbs up for the sweet extreme fine-tuning qualities found in MODx
            TinymceWrapper: Complete back/frontend content solution.
            Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
            5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
            • 3749
            • 24,544 Posts
            Actually, it's a longer chain than that in code if you use this:

            $modx->getOption('settingName', $scriptProperties, 'default'); 



            Each level will override those above it:

            System Settings
            Context Settings
            User Settings
            Default Properties/Property Sets
            Properties in a tag
              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