There may be a better answer for your application. My template has tabs across the top and contextual items on the left side. I needed something to highlight the tabs correctly while in submenus as well as keeping the submenu/contextual options correct. I haven’t checked to see if I can prune the parameters further. There may be some duplication, but I also have the situation that not all top-level pages (for the tabs) have child documents.
[[Wayfinder?startId=`0` &hereTpl=`a06hereTpl` &activeParentRowTpl=`a06hereTpl` &parentRowTpl=`a06Parent`
&parentRowHereTpl=`a06hereTpl`]]
The chunks are:
a06heretpl:
<li id="current"><a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+]</a></li>
a06parent:
<li><a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+]</a></li>
(I’m using a template based on the Andreas06 template by Andreas Viklund.) I didn’t want any submenus in the tabs, so there are no [+wf.wrapper+] placeholders in either chunk. The one trick here is that WayFinder doesn’t find children (and therefore use the ParentRow templates) unless your level setting includes any child pages (such as those linked by sub-menus). The side-effect of this is that if the level setting is too small, there won’t be any top-level highlighting when accessing a more distant child page.
For the submenu, I use the following:
[[Wayfinder?startId=`0` &rowTpl=`a06empty` &innerRowTpl=`a06row` &outerTpl=`a06blank`
&activeParentRowTpl=`a06blank` &parentRowTpl=`a06empty`]]
The chunks here are:
a06empty:
a06blank:
[+wf.wrapper+]
a06row:
<a class="nav" href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+]</a><br class="hide" />[+wf.wrapper+]
a06empty contains a single space. If a template chunk is completely empty, WayFinder uses its default value. The key point here is that except for the active parent row, there are no placeholders for menu items. This prunes other branches. The submenu is generated from the inner row template rather than rowtpl because top-level menu items with no children will be populated with rowTpl.