We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10726
    • 58 Posts
    Hello,
    I have a site that have up to 4 levels deep folder/files structure. I would like to have a nice vertical collapsable menu that would offer easy navigation at such site.

    Could anyone offer samples of code/snippets/demo on how to accomplish that?

    PS: "Minimal" template has somewhat similar nagivation tree on the right side - but it is not collapsable and hence is too long.

    Gleb
      • 33372
      • 1,611 Posts
      You can use WayFinder (or the somewhat older DropMenu) to create any menu you need. Just find an example of the type of menu that you want to make on the web somewhere (my personal favorites are on CSS Play). Then all you do is break that code down into the component parts that WayFinder needs to assemble that type of menu using your content, and viola!
        "Things are not what they appear to be; nor are they otherwise." - Buddha

        "Well, gee, Buddha - that wasn't very helpful..." - ZAP

        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
        • 26435
        • 1,193 Posts
        Get the Wayfinder snippet from the repository if you don’t already have it, then call it in your template as:
        [[Wayfinder? &startId=`0` &level=`4` &hideSubMenus=`true`]]

        See the Wayfinder wiki page for more details about the properties (parameters).

        -sD-
        Dr. Scotty Delicious, Scientist.
          Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
          All of the above... in no specific order.


          I send pointless little messages