We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4310
    • 2,310 Posts
    @ Henrik Nielsen
    Thanks for that, I have now corrected that and re-tried, but the same issues continue.
      • 12028
      • 152 Posts
      And one more try from here:

      [!Wayfinder? &startId=`[[UltimateParent? &topLevel=`2`]]`!]


      note that &startId are with small d
        - A small step for mankind, so why not take two...

        Working with web production, graphic design/workflow, photo and education - but are trying to get a life in between!
        • 4310
        • 2,310 Posts
        Aargh!!!!!
        Stupid me for copying and pasting without checking carefully.
        [!Wayfinder? &startId=`[[UltimateParent? &topLevel=`2`]]`!]

        Gives levels 3, 4, 5 etc. successfully. laugh
          • 9994
          • 133 Posts
          Hmm typo hehe, if I use ID or Id, both same result thow.

          If i use the code, i still have a submenu when i click on the level1 button of the mainmenu :S
          the submenu previews all levels >1

          i want to see the submenu only when i click on a mainmenu level2 button which has level3 pages.
          when i click on level 1 pages i don’t want to see the submenu.

          With submenu I mean seperated submenu.




            Best CMS eva!
            • 4310
            • 2,310 Posts
            This may not be the best way but I’ve created a snippet named SubMenu :
            <?php
            $doc_id = $modx->documentIdentifier;
            $top_ids = isset($top_ids)?$top_ids:'';
            $excludes = explode(",",$top_ids);
            if (!in_array($doc_id, $excludes)) {
                $params['topLevel'] = 2;
                $parent = $modx->runSnippet('UltimateParent', $params);
                $params['startId'] = $parent;
               $output = $modx->runSnippet('Wayfinder', $params);
            }
            return $output;
            ?>

            Then in my template where I need the sub menu to appear I’ve added :
            [!SubMenu? &top_ids=`2,15`!]

            Where &top_ids is a comma separated list of level one doc id’s that I don’t want a sub menu for.
              • 9994
              • 133 Posts
              Thankz allot for your code.
                Best CMS eva!