In my page template, I call Wayfinder, and the rowTpl includes this line:
<a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+] [+wf.subitemcount+]</a>
Wayfinder stuffs the count of children of each menu item into the field [+wf.subitemcount+]. So each menu item lists the number of submenu items under it.
A year ago, Wayfinder left [+wf.subitemcount+] empty if the number of children was zero. So each menu item had a number against it iff it had nonzero children.
The latest Wayfinder apparently always stuffs the number into [+wf.subitemcount+], even if zero. This makes the menu look not so nice.
I am looking for suggestions as to how I can make Wayfinder stuff the parenthesized number into [+wf.subitemcount+] if the number of children is nonzero, else stuff nothing. Then each menu item with other items under it will show a parenthesized number.
Houses for Sale(132)
Search
FAQ(32)
Contact Us
Also if you can point me to the right place to read about this in the documentation, I will give that a try.
Modifying the Wayfinder source code is always one way to solve the problem. I’m looking for a cleaner solution.
Thanks.
Rahul
Great. Yes your code is much cleaner, thanks.