We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5301
    • 25 Posts
    Hi Gurus

    Issue:
    Each user has a different menu setup.
    When user A logins, user A has 3 menu items.
    When user B logins, user B has 4 menu items.
    When admin login, admin sees all 5 menu items.

    In my login chunk, I have

    <!-- MODx login -->
    [!WebLogin? &tpl=`FormLogin` &loginhomeid=`[(site_start)]`!]
    [[Wayfinder? &startId=`0` &outerTpl=`accord_stdmenu_container` &rowTpl=`accordianRows` &innerTpl=`accordianInnerContainer` &level=`2`]]


    When the template execute the chunk above, the user logins but the menu isn’t updated and it is always point to
    http://localhost:8888/moe/index.php?id=1

    Q1: Is the above chunk the right way setting up for login ? If not, how do I set up exactly so that when a user logins, the user
    gets into his own page with his own menu items.

    Q2: I frequently have to cache clean on the manager to see changes.
    Is there an automated way to clean cache ?

    Any help is deeply appreciated.

    Thanks



    • Why are you going through all of this agony? The web user system and Wayfinder will take care of it for you. Create two web user groups and two associated document groups. Associate the web groups with the document groups. Now assign the resources to the relevant document groups. Assign your web users to the relevant web user groups, and the admin user to both groups.

      Now Wayfinder will only display the pages from group 1 to user 1, from group 2 to user 2, and since you’ll assign the admin user to both groups, he’ll see all of them.
        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
        • 5301
        • 25 Posts
        Hi Susan
        Thanks for responding.
        I already did as you suggested before the post.
        That was why I was concerned when the menus are not updated based on a user login.
        I will double check that.

        So
        Q1: Is my above chunk the right way setting up for login ? If not, how do I set up exactly so that when a user logins, the user
        gets into his own page with his own menu items.

        Q2: I frequently have to cache clean on the manager to see changes.
        Is there an automated way to clean cache ?