We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36700
    • 7 Posts
    I have a vertical menu with submenus that shows an arrow when there is a submenu. The arrow shows for the first level but not the second. I’m sure i’m just missing something simple or at least I hope.

    Here is some sample code from the menu.

    Thanks

    <ul class="menu">
    <li class="first active"><a href="#">Home</a></li>
    <li class="sub"><a href="#">I have children</a> --> parentclass set class perfectly
    <ul>
    <li class="first"><a href="#">I also have childern</a><ul> --> parentclass did not set class
    <li class="first"><a href="#">abcd</a></li>
    <li><a href="#">abcd</a></li>
    <li><a href="#">abcd</a></li>
    <li class="last"><a href="#">abcd</a></li>
    </ul>
    </li>
    </ul>
    </li>
    </ul>
      • 33968
      • 863 Posts
      You are trying to add class="sub" to container items in your menu?

      Just add &parentClass=`sub` to your Wayfinder call and it should add it in automatically for you.

      If that doesn’t work, can you post your Wayfinder call here?
        • 36700
        • 7 Posts
        [[Wayfinder? &startId=`0` &level=`4` &parentRowTpl=`cssplay_parentRow` &outerTpl=`cssplay_outer` &innerTpl=`cssplay_inner` &rowTpl=`cssplay_row` &excludeDocs=`66` &debug=`TRUE` &parentClass=`sub`]]

        _inner:
        <ul>
        [[+wf.wrapper]]
        </ul>​

        _outer:
        <ul class="menu">
        [[+wf.wrapper]]
        </ul>

        _parent row:
        <li[[+wf.classes]]><a href="[[+wf.link]]">[[+wf.linktext]]</a>
        [[+wf.wrapper]]
        </li>​

        _row:
        <li[[+wf.classes]]><a href="[[+wf.link]]">[[+wf.linktext]]</a>[[+wf.wrapper]]</li>​
          • 22427
          • 793 Posts
          Does the output change if you set [tt]&level=`0`[/tt] ?
            • 33968
            • 863 Posts
            Doesn’t seem like you’ve done anything wrong there huh

            Only thing I can suggest is to call Wayfinder uncached while you are troubleshooting so you always have a fresh output.
            Also check that your ’I also have children’ resource has the ’container’ box ticked.
              • 36700
              • 7 Posts
              level=0 didn’t change anything -- the debugger says that children are there.
                • 36700
                • 7 Posts
                looks like it has something to do with containers.
                  • 33997
                  • 150 Posts
                  Acc. to the wiki for Evo WF, parentRow checks 2 things: to see if it is a container, and that it has children, if that helps...
                    "Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein
                    • 22427
                    • 793 Posts
                    level=0 didn’t change anything -- the debugger says that children are there.
                    To explain why I asked:
                    If you limit the output by [tt]&level[/tt] , the items of the lowest shown level will not get the &parentClass , because their children are hidden.
                      • 22427
                      • 793 Posts
                      How is the style definition of your class [tt]sub[/tt] ? May be it’s an issue with the specifity of selectors.