We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30128
    • 78 Posts
    I have a new and diversed range of different content managers, which are all also board members of my organisation. To help them out, and to store some internal ’notes’, I want to create a set of webpages which only they can see.

    However, access to web dokuments can only be specifically set up for web users, when all my folks are content managers. I would love to have it so that when they logged in, they got the special ’board members’ menu item, in which they found all the internal dokuments.

    Is it possible to achieve this without creating a new set of users for them? It doesn’t make sense to do so, since these persons are the very same that already have extra permissions in the first place.

    TJ
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Yes, create a snippet to check the SESSION and make sure the user is a member of the required manager user group, and if they are, use a $modx->runSnippet(’Wayfinder’, ...) function to generate your menu. I’ve done this several times to allow manager users access to certain sections of a site.
      $id = $modx->documentIdentifier;
      if(isset($_SESSION['mgrInternalKey'])) {
          return $modx->runSnippet('Wayfinder', array('startId'=>$id,'level'=>'1','removeNewLines'=>'1','rowTpl'=>'PeopleLinks','textOfLinks'=>'pagetitle'));
      } 

      Change the ’startId’=>$id part to suit your structure.
        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
        • 30128
        • 78 Posts
        So in effect I’m creating a second menu to show the specific links?

        I’m already using WayFinder to create my menu like this:

        [[Wayfinder?startId=`0` &outerTpl=`mh.OuterTpl` &innerTpl=`mh.InnerTpl` &rowTpl=`mh.RowTpl` &innerRowTpl=`mh.InnerRowTpl` &firstClass=`first`&hereClass=``]]

        Ideally the restricted sites should simply show up in the above menu if the users have access.
          • 30128
          • 78 Posts
          On the same topic, can I get my content managers to blog? Technically I mean, although I have some persuasive power in other areas as well smiley