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

    Is there a way that wayfinder shows a menu structure like this:

    Structure of resources in the manager:

    Level 1
    -- Level 2 (marked as "don't show in menu")
    ---- Level 3.1
    ---- Level 3.2

    To output should be:

    Level 1
    ---- Level 3.1
    ---- Level 3.2


    1. The option &excludeDocuments will exclude also all the children of a resource/container that is excluded from the menu.
    2. The combination &ignoreHidden thogether with &excludeDocs won't work either

    My setup:

    • MODX 2.2.6
    • Wayfinder 2.3.3

    Thanks for your help.

    Fabian

    This question has been answered by ottogal. See the first response.

    • discuss.answer
      • 22427
      • 793 Posts
      Setting Level 2 to "Hide from Menus" will hide its children too.

      You could use the property levelClass:
      [[Wayfinder? &startId=`0` &levelClass=`layer`]]

      That assigns a class="layer1" to the item Level 2 and a class="layer2" to the items Level 3.1 and Level 3.2 (because the counting starts at the children of the top level).

      If you then define this rule in your CSS, it should work:
      li.layer1 { display: none; }
        • 36818
        • 119 Posts
        This seems to be a practicable way to solve my problem.

        Thank you for your hint.

        Best regards.
        Fabian