We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14281
    • 120 Posts
    Sorry if I’m missing the obvious, but is there a way to create a document group that is restricted to guest, i.e. users who are not signed in, so that actual web users cannot see it?
      • 30223
      • 1,010 Posts
      I don’t think it’s obvious at all wanting to hide something from logged in users if they can see it anyway if they don’t log in. Anyway you’d have to write a plugin to do that which checks if a user is logged in and then removes menu items or denies access to pages.

      Why wold you want to do this?
        • 14281
        • 120 Posts
        Quote from: TobyL at Sep 20, 2006, 08:51 PM

        I don’t think it’s obvious at all wanting to hide something from logged in users if they can see it anyway if they don’t log in. Anyway you’d have to write a plugin to do that which checks if a user is logged in and then removes menu items or denies access to pages.

        Why wold you want to do this?

        ...to automate certain things, especially menu building. I don’t particularly care if logged-in members see certain guest content, but there are certain things that they have no need up, such as the login page. When a member is logged-in, they shoudn’t see a log-in link anymore, but rather a log-out link. There are a couple of other rare exceptions, but perhaps there’s a different way to go about it.
          • 25663 MODX Staff
          • 12,272 Posts
          There’s a demo of switching login to logout in the demo content that installs with MODx. It doesn’t perform the name, but does change the name of the link.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 14281
            • 120 Posts
            I’ve run into another situation where I need a "Guest Only" group, so that certain pages can be automatically hidden from logged in users. It’s not so much that logged in users shouldn’t be allowed to see these pages - they are more than welcome to, of course - but rather these pages are a nuisance for logged in members. For example, I have a page entitled "How Do I Sign Up?". You can imagine that members don’t need to see this page, nor see it in their menu.

            It would be nice to have a group for guests, rather than having to create a TV for each instance of a page like this (though that did work quite well for the Login/Logout page, thank you).