We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21808
    • 5 Posts
    HI

    I have a client which would like to show all pages in the menu but just not to have a link on those pages which you don’t have access to. then once you login those pages will become links is this possible.

    thanks in advance.
      • 3749
      • 24,544 Posts
      Someone else may have a better answer for you, but I can think of a couple of not-very-elegant ways to do this. They depend on the structure of your site.

      If you can create two different Wayfinder menus, one for logged in users, and one for everyone else, you can put the two Wayfinder calls in separate chunks and show the appropriate one to users with the Personalize snippet.

      This works best if all the pages that shouldn’t be seen by the general public are in one or two folders.

      Another version of this method it to set all the hidden documents to not show in the menu and then, in one of the Wayfinder calls, use &ignoreHidden to ignore that setting.

      Note that neither of these methods will prevent a non-logged-in user from going to those pages directly it they know, or can guess, the URL. If you need to prevent that, you’ll have to put a snippet in the template for those pages that checks the loggedin status and boots the user if not logged in (you can use Personalize here and just have a redirect to the home page in the not logged in chunk).

      Hope this helps,

      Bob
        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
        • 24495
        • 407 Posts
        I’m not so skilled with PHx but this may be a way. Look at the PHx Wiki: http://wiki.modxcms.com/index.php/PHx

        Should be possible to "filter" the &rowTpl (with or without a link) by
        [+phx:mo=`myWebgroup`:then=`I'm a member`:else=`I'm NOT a member`+]