We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17667
    • 108 Posts
    I have a navigation menu which needs to wrap sub-items differently based on the parent. The row templates in Wayfinder (rowTpl, innerRowTpl, parentRowTpl) all receive TVs and other parameters. But the wrappers (outerTpl, innerTpl) are more limited.

    Is there any way to pass variables to these wrappers so they can behave differently depending on their parent? Something like:
    [[+template:is=`9`:then=`<ul class="item_list">[[+wf.wrapper]]</ul>`:else=`<div class="sub-nav"><ul[[+wf.classes]]>[[+wf.wrapper]]</ul></div>`]]


    Because there can be multiple conditionals and sub-menus I don't want to rely on trying to hard-code the wrappers in one of the row templates.

    I understand there are other ways to tackle this with CSS but I am curious if I am missing something about using innerTpl.