We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30564
    • 60 Posts
    All, is there a technique which allows Wayfinder to add an ID based on the logical row or category.

    As an example I’d like to run dropline menus and provide styling according to depth, but I’ve only found &rowIDPrefix. I see there’s mention of &levelClass but I don’t see how that’s driven.

    Another question, has anybody expanded the dropline config past 3 rows successfully, and is wiling to share their experiences? I found where I had to 2 parents in row 4 the first parent’s children [row 5] were over writing the second parent’s, hence the css idea, maybe send some to the left or even down.

    I have this feeling that it’s staring me in the face. On the last point, anyone looked at trying to implement the more recent css menu ideas as configs? Though I see there’s more copyrights there than there used to be.

    Regards & TIA

    /edit mad typist strikes again...//
      • 15987
      • 786 Posts
      the level class will add a class to each row item with a number appended to it accoriding to the level. For example if you set the parameter like this &levelClass=`level` you would get the following output:

      <ul>
          <li class="level1">
              <ul>
                  <li class="level2"></li>
              </li>
          </li>
      </ul>
      


      That might be what your looking for. I would just give it a try and see if it will do what you need. I am planning to add a new placeholder to output the level so that you could use it anywhere. That will be in my next beta release.
        • 30564
        • 60 Posts
        OK that might do it, thanks for the prompt response. Quickly tried that, and it does create level effectively as a category, so it may well be a way forward.

        Regards
          • 30564
          • 60 Posts
          Looks promising and subsequently gave me a lateral ’accordion’ style thought. Is there an equivalent call to place a level in the <ul>, or could there be?

          If so, I think, those who wanted multi-level accordions, could then run Wayfinder with these 2 params set to provide toggler and element class identities. Then, logically, by amending the standard MooTools accordion js to run as an array it could set up an array of toggle calls, even if it had to account for the toggle always being one less then the element, unless the params were synced, which would be ideal, in Wayfinder.

          e.g.
          <div ="multi-accordion>
             <ul class="toggler1" .. ... >
                  <li class='element2" ... >
             <ul class="toggler1" ... ... > [same level]
                   <li class="element2" ... >
             <ul class="toggler 2 ... ...> [next level]
                    <li class="element3">      
          


          js
          ....
          var toggler=$$(togglerName+counter);
          	var content=$$(contentName+counter); [or -1 ? would need some failsafe code for start & end I guess]
          	while(toggler.length>1)
          ...
          


          Could be used to create distinct menu structures by full layer, not just row, as well.

          Thoughts?

          Regards and again thanks