We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29162
    • 4 Posts
    Let me first explain my website structure. I have the following containers. A & B are also containers.

    container1
    -A -> 1 to n number of articles
    -B -> 1 to n number of articles
    container2
    -A -> same as above
    -B
    container3
    -A
    -B

    Every 1st level container has 2 containers known as A & B. Each one of A & B has multiple articles inside them.

    Now if I create a menu of the above as it is, the website template would appear like this:

    container1
    -A
    -B
    container2
    -A
    -B
    container3
    -A
    -B

    So when I’ll click e.g. A under container1, the "1 to n number of articles" from Container1->A will be displayed perhaps as a list of hyper link of in the main body.

    Now I want to change it to something like the following:


    A | B
    container1
    container2
    container3


    I show only the 1st level containers in the menu and display two hyper links or menu on the top right side i.e. A | B
    Now lets go through a walk through of what I want to happen:

    1. User opens the website, click container1
    2. the website in response displays all the articles (as list of hyper links) from both A & B (under container1)
    3. the user clicks on A on top right side and articles from just A (under container1) are displayed
    4. if the user clicks on B articles from just B (under container1) are displayed

    So basically A or B picks up articles from within itself depending upon which container was clicked by the user
    previously.

    How can I do this ?

    What I think will happen would be that A | B will be some kind of snippet which picks up the id of the current
    container and then displays content from within itself based on the id that was selected.

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Two Wayfinder calls.

      One for the main menu, &startId=`0` &level=`1`.

      The second for the sidebar menu, and use the UltimateParent snippet as the startId value for that one.

      Or, use a TV to contain the second menu, with @INHERIT as its default value, then for each parent document edit it to be the Wayfinder call with the startID of that document. That way all of its children will inherit that menu.
        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
        • 29162
        • 4 Posts
        >One for the main menu, &startId=`0` &level=`1`

        I did the above and what I get is the following:


        container1
        container2
        container3

        container1
        A
        B
        container2
        A
        B
        container3
        A
        B

        I haven’t touched the sidebar menu yet.
          • 29162
          • 4 Posts
          Never mind I figured it out, what you are calling as main menu was my side menu.