We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13736
    • 345 Posts
    Are you trying to use the personalize snippet or the IF snippet?
      • 17016
      • 138 Posts
      For this purpose we use the personalize snippet. Isn´t it possible to add just anywhere a logout-URL?
        • 3749
        • 24,544 Posts
        Quote from: Letti at Apr 21, 2011, 01:50 PM

        For this purpose we use the personalize snippet. Isn´t it possible to add just anywhere a logout-URL?

        I think the Login snippet automatically shows a logout link for logged-in users, though you could certainly do it with Personalize. Just put a logout link in the "Yes" chunk. In fact, I think if you put [[!Login]] in the "Yes" chunk, it will show a logout link automatically since the user will be logged in.
          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
          • 13736
          • 345 Posts
          If you are trying to put a stand alone logout link, you can probably copy the "a" tag from the ignLogoutTpl.
          <a href="[[+logoutUrl]]" title="[[+actionMsg]]">[[+actionMsg]]</a>


          That should work as far as I know. It probably requires the Login snippet to be initialized somewhere on the page.
          • Quote from: splittingred at Sep 26, 2010, 09:41 PM
            With core output modifiers:

            [[+modx.user.id:if=`[[+modx.user.id]]`:eq:=`0`:then=`Not logged in. <a href="[[~123]]">Login</a>?`:else=`Welcome [[+modx.user.username]]!`]]
            

            Fixed a few small issues (uncached tags and typo in eq=`0`) and shortened it a bit:
            [[!+modx.user.id:eq=`0`:then=`Not logged in. <a href="[[~123]]">Login</a>?`:else=`Welcome [[!+modx.user.username]]!`]]