We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20732
    • 7 Posts
    I stumbled over the following peculiarity in Wayfinder 2.0 that I suspect is a bug.

    When you have several levels and one of your sub-levels only contain one item it is not marked as BOTH "first item" and "last item" in wf.classes even though this is actually the case. It seems that Wayfinder obly stamps it as "first item".

    To fix this change line 93 in wayfinder.inc.php from:

    if ($counter == ($numSubItems) && $numSubItems > 1 ) {

    to:

    if ($counter == ($numSubItems) /* && $numSubItems > 1 */) {

    This will allow Wayfinder to attach both the "first" and "last" class to the same item.

    I haven’t researched nor tested this fix extensively so for all I know it may break something under different circumstances, but it works for what I need in the current case.
      • 16183
      • 1,390 Posts
      Not sure if it addresses you point, but have you had a look at the new WF 2.5 beta? There’s an issue about a fix for the "last" class if there’s only one item.

      Here’s the link - http://modxcms.com/forums/index.php/topic,33904.0.html

      cheers/k