We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26866
    • 6 Posts
    How to create logout link with WebLogin snippet?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      The original WebLogin form template does it automatically. When logged in, the logout section of the template is displayed.

        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
        • 26866
        • 6 Posts
        Quote from: sottwell at Sep 11, 2008, 03:25 AM

        The original WebLogin form template does it automatically. When logged in, the logout section of the template is displayed.

        Using [[WebLogin]] does not work correctly.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          No, it won’t. Any dynamic snippet, such as forms where there is user interaction, needs to be called uncached if the page it’s on is cached. You need [!WebLogin!].

          The submission of the form simply requests the same page again with POST values. If the whole thing has been cached, the request gets just the cached page; the snippet isn’t run, and there’s nobody paying any attention to the POST values. If the snippet is called uncached, even on a cached page MODx will run the snippet, and the snippet will catch and process the POST values.
            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
            • 26866
            • 6 Posts
            Thanks a lot smiley

            Can I put that link into menu block?