We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32098
    • 31 Posts
    Am I the only newbie having problems getting Wayfinder in Revolution to display child resources? I have got the first line of the horizontal menu up and looking nice and was expecting lists of the child resources to then drop down with a little JQuery easing. But the child resources are not showing. Tried debug on the Wayfinder call. The parent resources are acknowledged as having children but the child documents are not (or the info relating to them is not) being retrieved.

    I am calling the Wayfinder snippet from a chunk as follows:

    [[Wayfinder? &startId=`0` &outerTpl=`menuouterchunk` &rowTpl=`menulichunk` &innerTpl=`menuinnertpl` &titleOfLinks=`pagetitle` &textOfLinks=`menutitle` &selfClass=`current` &hideSubMenus=`FALSE` &debug=`TRUE` &level=`0`]]


    Actually I only want 2 levels to show up, but I am declaring level=0 just to try to get as much stuff below the top level as possible - or something at least.

    I have checked that the chunks for the menu templates all have the
    [[+wf.wrapper]]
    in the right place. Hence, chunk for the top-level (parent) li:

     <li[[+wf.id]][[+wf.classes]]><a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]>[[+wf.linktext]]</a>[[+wf.wrapper]]</li> 


    And chunk for the child ul:

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


    Also checked that the child resources are ticked as being published and that the right parent resources are indicated in the box with the resource details.

    I am assuming this is not a CSS or JQuery problem because Wayfinder in debug mode just isn’t registering the details of the child documents. Have, in any case, tested the CSS and JQuery in a static version of the menu and it works fine.

    I must be overlooking something really, really basic. Any ideas?

      • 26016
      • 561 Posts
      Hi,
      It’s hard to tell without being hands-on. I have noticed that newbies’ recent Wayfinder problems have fallen into 2 categories. One is just simple typos, or getting the new Revo syntax wrong for the call.

      The other is getting super-complex with templating. I’ve used Wayfinder for a very long time, and have found that I rarely need templates at all, opting instead for CSS to take care of that stuff - what a bare Wayfinder call pumps out is already very good and stylable, and one or two parms may take care of the rest. My experience, anyway.

      So my first suggestion couldn’t be simpler - just save the code for your call, and then do a plain Wayfinder call -

      [[Wayfinder? &startId=`0`]]

      and this will tell you if you’re getting a second level very quickly. Be sure you’re viewing source, as CSS could indeed vanish levels.

      Cheers, Dave
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 32098
        • 31 Posts
        Dave,

        Thanks for the excellent suggestion. I started again from scratch with an unstyled menu and no extra parameters on the Wayfinder call, gradually adding everything back and checking after each addition. The result: It is now working. The three chunks I was using proved not to be the problem. The problem seems to have been the &hidesubmenus param

        &hideSubMenus=`FALSE`


        It was silly to declare that - I guess - because FALSE is the default setting, I gather. I was working through Kongondo’s book (forgive the spelling if I have got the name wrong) and getting carried away with adding stuff that didn’t really need to be added. However, with the param set to FALSE in the Wayfinder call the drop downs don’t work. If I don’t include the param at all, they do work. Strange.

        To illustrate this I have put up a test page with two menus, the only difference between which is the addition in the second of the hideSubMenus param set to FALSE. The drop down on the Destination tab works on the first menu but not on the second. It is here:

        http://secure.sitesdns.com/~epablo/menutest.html

        Thanks again. I was getting so desperate that I was on the border of having an Oates moment (of Scott and the antarctic fame), and wondering whether it might be better to unzip the tent and limp out into the icy embrace of an antarctic oblivion. Not now, though.

          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Usually it’s better to use 0 and 1 instead of true and false.
            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
            • 32098
            • 31 Posts
            Thanks for pointing that out Susan. I was following what was said in the Wayfinder documentation and also what Mr Kongondo said in his book, but I will bear in mind the binary equivalents of TRUE/FALSE in future.

            Thanks.