Hello,
I am using wayfinder for a menu in my site - and am using CSS to deliver the relevant background images.
Only one section of the site currently has a sub menu - and at the moment only one sub page exists - and I am displaying that sub page in the menu like so:
+ Home
+ About Us
- History
+ Portfolio
+ Contact Us
etc
In my testing, if there is only one sub menu item, wayfinder does not include the [+wf.classes+] for the sub menu - so the correct background image is not shown (eg the css breaks).
However, if there are 2 or more sub menu items it does - and the menu looks as intended (as controlled by the css).
I need [+wf.classes+] inserted even when only one sub menu item exists.
Anyone know how to do this?
I’d like to avoid having to change the css everytime I add / remove a sub menu item.
My way finder call is as follows:
[[Wayfinder?
&startId=`0`
&level=`0`
&outerTpl=`menu-sub_outer`
&rowTpl=`menu-sub_outer-row`
&innerTpl=`menu-sub_inner`
&innerRowTpl=`menu-sub_inner-row`
&titleOfLinks=`menutitle`
&excludeDocs=`5,12,13,3,4,2,19`]]
the &innerTpl=`menu-sub_inner` is as follows:
<li[+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]"><span>[+wf.linktext+]</span></a></li>
I need something like this, with class="last" added even when only one sub menu page exists:
<div id="nav">
<ul>
<li><a href="#"><span>Home</span></a></li>
<li class="active"><a href="#"><span>About Us</span></a>
<ul>
<li class="last"><a href="#"><span>History</span></a></li>
</ul>
</li>
<li><a href="#"><span>Portfolio</span></a></li>
etc
</ul>
</div>
Thanks in advance.