We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8619
    • 229 Posts
    Here is the problem that I am having.

    I have a ’members’ area that is secured with the weblogin snippet. When someone logs in, there is no button anywhere to logout, and I’m not sure what I am missing.

    Here is my call:
    [[WebLogin? &loginhomeid=`25` &logouthomeid=`2`]]
    where 25 is the secured section start page.

    Also, when someone clicks on a link in the members section to view one of the news articles, and then uses the breadcrumbs to go back to the members section main page, or uses the menu button on the left side of the page, it shows nothing, but does give a "logout" at the top of the breadcrumb....

    Since this is a sample site and not ’live’ yet, here is the address if you wish to login and see for yourself:

    http://016b4fe.netsolhost.com

    user: testing
    pswd: test123

    Thanks in advance!
    • Make sure to call the script uncached: [!WebLogin? &loginhomeid=`25` &logouthomeid=`2`!]
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 8619
        • 229 Posts
        Ok, I tried calling it uncached, and it still gives me the ’Logout’ when I use the breadcrumb at the top to go back to the ’Members Area’.

        I’m still trying to figure out the NewsManager feature, so I’m not sure what I might be missing with that part.

        Also, what is the difference between calling something cached/uncached, vs. the page being cached? I know about caching a page in the viewers computer, but not sure what the snippet call means.

        Thanks!
          • 7923
          • 4,213 Posts
          Read this: Document caching

          Also, you will see the logout link as long as you are logged in.. even if the login redirects you to some member area and you browse away from there with links or browser buttons, it doesn’t automatically log you off.. you need to click the logout link for it to log you out.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 8619
            • 229 Posts
            Thanks for the explanation! That makes it so much more clear to me now....

            As far as the Logout button, it doesn’t appear when in the normal pages anywhere. it only appears if you attempt to use the breadcrumb to return to the main members area page, or if you attempt to click on the members area navbar section on the left side of the site. Nothing else shows up at that point, just the ’Logout’ option, and it is immediately to the right of the breadcrumb. I can’t figure out what is going on or what I am missing.....

            Any ideas?
              • 7923
              • 4,213 Posts
              Is the snippet in those pages still running cached, eg. [[WebLogin...]] perhaps? Change it to be [!WebLogin..!] in all pages. Or do you mean that in the member pages, the document content disappears and there is just that logout link? Do they use different template or something`? I would probably need to see it myself to understand what you mean..


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 8619
                • 229 Posts
                All snippet calls in the members area, and now the site are running uncached.

                When the ’member’ is in the ’Members Area’ and is logged in, if they go to the ’Chief’s Corner’ for example, and then read the article, and click on the breadcrumb or the members area link in the navbar, No content is shown, only the ’Logout’ link appears, and it looks like it is smashed up against the breadcrumb. I’m thinking I’m missing some of the styling, which I know, I was wanting to get everything working first and then worry about the styling.

                  • 8619
                  • 229 Posts
                  All documents are using the same template, missed that answer back to you....

                  Also, you can use my guest login for the site located here to see for yourself:

                  http://016b4fe.netsolhost.com

                  user: testing
                  pswd: test123

                  Let me know what you think....it’s really wierd.....
                    • 7923
                    • 4,213 Posts
                    The Members Area (ID 24) contains just the login snippet call, then it redirects to the Members Section Home Page (ID 25), if you then go to some of the topics and from breadcrumbs click back to Members Area, it goes to the document id 24 that has only that login box and when you are logged in, it only shows that logout link. If you want the Members Area document link to the Members Section Home Page always when you are logged in, you can make a snippet that checks if the user is logged in and does a redirect if he is, eg:
                    if ($modx->getLoginUserName()!="") {
                        $modx->sendRedirect($modx->makeUrl(25, '',''));
                    }
                    


                      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                      • 8619
                      • 229 Posts
                      Awesome! Thanks for the help.....now where would I need to call that snippet? On each members area page or where?

                      Thanks!