We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25345
    • 2 Posts
    I am trying to get accordion working with Wayfinder for a particular category.

    My structure is like this:

    Main Category
    - Sub Category 1
    -- Sub Page 1
    -- Sub Page 2
    -- Sub Page 3
    - Sub Category 2
    -- Sub Page 1
    -- Sub Page 2
    -- Sub Page 3
    - Sub Category 3
    -- Sub Page 1
    -- Sub Page 2
    -- Sub Page 3

    and so on..

    I tried replacing startid with the main document’s ID but it didn’t work, I even tried following codes but nothing helped.

    [[Wayfinder? &startId=`[[UltimateParent]]` &level=`1` &hideSubMenus=`0` &outerTpl=`wfOuter` &innerTpl=`wfInner` &parentRowHereTpl=`wfParentRowHere` &parentRowTpl=`wfParentRow` &activeParentRowTpl=`wfParentRowHere` &jsTpl=`wfJs`]]
    


    [[Wayfinder? &startId=`[[UltimateParent? &topLevel=`1`]]` &level=`1` &hideSubMenus=`0` &outerTpl=`wfOuter` &innerTpl=`wfInner` &parentRowHereTpl=`wfParentRowHere` &parentRowTpl=`wfParentRow` &activeParentRowTpl=`wfParentRowHere` &jsTpl=`wfJs`]]
    


    I would appreciate if someone can take a look and help me out.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      When nesting snippets like that, the outer snippet (Wayfinder in this case) needs to be called uncached [!Wayfinder....!] and the inner snippet called cached.
        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
        • 25345
        • 2 Posts
        aha, we need to call snippets twice? I was actually trying to get a list in UL and LIs and then I was thinking of using CSS to stylize them.

        I will try to call them uncached and see how it goes.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          No.
          [!Wayfinder? &startId=[[UltimateParent]] ... !]

          The Wayfinder snippet is uncached, the UltimateParent snippet is cached.
            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