We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40747
    • 18 Posts
    Hi. I have to display menu which contain links to documents:


    * Schools
    ..* University 1
    ....* Department 1
    ......- Institue
    ....* Department 2
    ......- Institute 2
    ..* University 2
    ....* Department 3
    ......- Institute 3
    ....* Department 4
    ......- Institute 4

    And I want to display it like in attached image. Could you help me? It's very important for me sad
      • 10208 ☆ A M B ☆
      • 1,780 Posts
      To display the menu like you want, use css to style and position it. To get MODX to dynamically display the menu, use Wayfinder or getResources.

      http://rtfm.modx.com/extras/revo/wayfinder
      http://rtfm.modx.com/extras/revo/getresources

      Place your resources in the resource tree just like you have shown above, with parents and children. MODX will respect that hierarchy.

      I'm thinking getResources is the better choice for this menu. Check out the documentation, &toSeparatePlaceholders might be what you need.
        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 40747
        • 18 Posts
        I know that I can use WayFinder or getResources, but I don't know how to use it to get menu like I want :/
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Wayfinder generates a nested unordered list. So you can use CSS to position and format each section of the menu.

          You would probably want to use the tpls to add structures to the lists, for example putting <span> ... </span> tags around the link text, so you can work with just the the link text.

          Do you have a sample of a working menu of this type? Basically, just look at the source for that menu, then configure Wayfinder to output that HTML code.

            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