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

    I am encountering 2 problems with a Wayfinder jQuery accordion menu on the website www.bodypt.nl/new:

    1. How to make a top parent menu item have an active color when one of its sub-items is active (color green on website).

    2. How to let the sub-items disappear (menu closed) when sub-items of another parent are opened.

    The Wayfinder chunks are:

    outerTpl
    <ul id="menu">
    	[+wf.wrapper+]
    </ul>


    parentRowTpl
    <li>
    	<a title="[+wf.title+]">[+wf.linktext+]</a>
    	[+wf.wrapper+]
    </li>


    innerTpl
    <ul>
       [+wf.wrapper+]
    </ul>


    Wayfinder call
    [[Wayfinder? &startId=`0` &outerTpl=`outerTpl` &innerTpl=`innerTpl` &parentRowTpl=`parentRowTpl`]]


    I think for both jQuery is the answer, but I am not good with jQuery programming. Any help is welcome.

    Thanks.

    Tyronne
      • 10076
      • 1,024 Posts
      Which menu are you using? I just finnished a wayfinder config file a minute ago with an accordeon menu of Dynamic drive. The collapsing of the menu is done by a parameter you can set. It looks you are using the one from a fellow country man of ours, Marco van Hylckama. And I don t see an option to change the way the menu behaves. Niether an option to set the "current" state. But maybe that s just CSS. You might wanna shoot Marco an email.
      Or wait a day so I can test the config file and post it.

      mazzel, Frank.
        • 32316
        • 387 Posts
        Edit I just noticed this was an old post... oops

        From the Wayfinder documentation http://rtfm.modx.com/display/ADDON/Wayfinder:
        Please note that you will need to wrap the placeholders with the relevant tags.

        Evolution: [+wf._____+]
        Revolution: [[+wf._____]]


        You seem to be using Revolution ( since you write ’ [[Wayfinder? ... ’ )
        But your place holders start [+wf.
        you need [[

          • 28042 ☆ A M B ☆
          • 24,524 Posts
          @whistlemaker, [[...]] is perfectly good cached snippet tags in Evolution. Where it changes is if you want uncached; then for Evo it’s [!...!] and for Revo [[!...]]
            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