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

    I'm sure this has been asked, but I can't find anything anywhere. I have some password protected pages on a web site. I have the page protection working ok, but the link to the page is always showing up in the main menu. If a user is logged in, the link goes to the correct page and if the user is NOT logged in it goes to the home page. Is there a way to hide the link completely if a user is not logged in, ot does not have permision to view the page? I'm using Wayfinder for the menus. Please let me know if this does not make since.

    Thanks,
    Ross

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

      • 18373 ☆ A M B ☆
      • 3,141 Posts
      If the page is locked down using user permissions, it shouldn't appear in the wayfinder menu.. in this case it sounds like you're using something else though, so you might need to add something that checks for the permission in your Wayfinder rowTpl chunk to show/hide as needed. Maybe you have a TV value that says whether it is visible or not?

      Alternatively, just set the protected resource to be hidden from menus when adding the password. smiley
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 50519
        • 7 Posts
        I'm using this below to password protect the page, if this technique should hide the page, then I must have missed a step somewhere. I'll look into what you suggested.

        Thanks,
        Ross

        https://rtfm.modx.com/revolution/2.x/administering-your-site/security/security-tutorials/making-member-only-pages
          • 22840
          • 1,572 Posts
          Be sure your not testing it when your logged into the manager section
            • 50519
            • 7 Posts
            Thanks Paulp, I did, I also tested it in a couple different browsers and from my iPhone. I'll try again, just to be sure. Thanks!

            Quote from: paulp at Jun 03, 2015, 07:29 AM
            Be sure your not testing it when your logged into the manager section
              • 50519
              • 7 Posts
              ok, so I just cleared the cache (Site -> clear Cache) and now I am having the exact OPPOSITE issue. I can't get the link to show up in the main menu. I obviously did something wrong, so time to start over...

              UPDATE: I removed the resource group, saved, added the resource group back, saved, and now I am back to my original problem. Going to start over now and see what happens.

              Ross [ed. note: rtlehr last edited this post 11 years, 4 months ago.]
                • 22840
                • 1,572 Posts
                Make sure that you are not calling wayfinder cached
                • discuss.answer
                  • 50519
                  • 7 Posts
                  Ok, got it!! It was a caching issue (Thanks Paulp) it was a combination of setting the wayfinder cacheResults to 0, and unclick the "Cacheable" option on the individual documents "settings" tab. Thanks for all your help everyone.

                  Ross