We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41613
    • 8 Posts
    Hi,
    I have been through BobRays book tutorial and the Modx tutorials about creating Member pages but i can't get it working as i want it to. Am i correct in thinking that my wayfinder menu should only display the menu item placed within my member resource group when a user is logged in and has member status - or is there another step i ned to carry out?

    The non-members can't view the page but they can see it in the menu and i want to hide it from the menu for non-members. how do i do that?
    Thanks for any help
      • 3749
      • 24,544 Posts
      I could be wrong, but I don't think Wayfinder checks group status, just published status.

      You can put an output modifier in the Wayfinder Tpl chunk that checks it (I think it's :isMember=`groupname`), though that will be a little slow.

      You can also put alternative menus in chunks and use the Personalize snippet to show a different chunk to logged in or not-logged-in users or to show one chunk to members of a certain group.

        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
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Is your Wayfinder call cached or uncached? If a page is viewed by a manager user or by a logged-in user and the whole page is cached, including the menu, then the next visitor will get the cached page...including the menu. So Wayfinder needs to be called uncached so the menu is generated for each page.
        [[!Wayfinder? ...]]

          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
          • 41613
          • 8 Posts
          Hi,
          Thanks Bobray and Sottwell for your quick responses.
          I think the personalize extra might be what i need here so do i just add my 'logged in chunk' in the &yesChunk...does this extra rely on any other extras being installed?

          [[!Personalize?
          &yesChunk=`loggedInMenu`
          ]]

          UPDATE:: Just to let you know this does indeed work as expected, thanks very much:-) Instead of the 'members' menu item appearing in the main menu i have the members pages appearing in a side menu - which is a good alternative in this instance. [ed. note: geronimo171 last edited this post 12 years, 5 months ago.]