We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8542
    • 37 Posts
    Lets say I have a Menu-bar subitem called: Register - Now obviously if a user is logged in they wouldn’t need to see this. Is there a way to hide it?
      • 25663 MODX Staff
      • 12,272 Posts
      Try the MemberCheck snippet.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        If it’s part of the login snippet (it can be a placeholder, so they don’t need to be together on the page) then when the user is logged in, the logged-in display won’t show the login form or the registration link. I believe you can look at the default WebLoginPE form for an example.
          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
          • 29774
          • 386 Posts
          Or a simple snippet...
          <?php
          # user logged in?
          $test = $modx->userLoggedIn();
          
          if (!$test['loggedIn']) {
          	return $modx->getChunk('myChunk');
          } 
          return '';
          
            Snippets: GoogleMap | FileDetails | Related Plugin: SSL