We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46835
    • 11 Posts
    Hello,

    I am trying to get a - depending on whether I am logged in or not - login and logout link in my navigation. I am using the Login package for ModX Revo. How can I achieve this?

    Thank you in anticipation!

    This question has been answered by BobRay. See the first response.

    • discuss.answer
      • 3749
      • 24,544 Posts
      The Login snippet will do this automatically, but usually it goes as a tag in the template rather than in the nav.

      You can usually find a way to make it look like it's part of the navigation if that's what you want.
        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
        • 3109 ☆ A M B ☆
        • 894 Posts
        I'm not sure what you want to do but if you want the logout link to be displayed in your wayfindre navigation just make a new resource and change its resource type to weblink, then in the weblink field put the resource id of your login page with the &service=logout parameter.

        Here's a sample:

        
        [[~17? &service=logout]]
        
        


        Just change 17 to the number of the id of your login resource and it should work fine, hopefully that's what you meant.

        Good luck.
          Benjamin Marte
          Interactive Media Developer
          Follow Me on Twitter | Visit my site | Learn MODX
          • 46835
          • 11 Posts
          BobRay's answer was the one I needed. Thanks, this can be closed.