We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26395
    • 2 Posts
    Hello all,

    I’m trying to create a menu that is generated from a parent that is always 2 levels deep (or back). I know nothing about snippets or PHP, but I somehow managed to get part of the result I am looking for by doing this:

    [[GetField? &parent=`1` &parentLevel=`2`&field=`id`]] This returns the number of the folder that is always two levels back. I’ll call it ’X’.

    When I manually insert ’X’ into this:

    [[Wayfinder? &startId=`X` &level=`1`]] I get the menu I need from two parents back. Because these both work properly and independently, is there a way to combine the two so I can use the result from the first snippet IN the second (so it would act something like this)?

    [[Wayfinder? &startId=` [[GetField? &parent=`1` &parentLevel=`2`&field=`id`]] ` &level=`1`]] where GetField will retrieve the parent number and Wayfinder will display the menu based on the result?

    Any help is appreciated! Thank you!
      • 4310
      • 2,310 Posts
      Try :
      [!Wayfinder? &startId=` [[GetField? &parent=`1` &parentLevel=`2`&field=`id`]] ` &level=`1`!]

      Caching needs to alternate, GetField (cached) is parsed first, then Wayfinder (uncached).
        • 26395
        • 2 Posts
        Thank you bunk! That did it. I really appreciate the fast response! What was it, a whole two minutes my question was online? Ha! Thank you!
          • 4310
          • 2,310 Posts
          Sorry you had to wait two minutes.
          That’s a long time on this forum wink