Hello,
This is my first encounter with ModX and I must say that I simply love it.
While trying to educate myself, I followed some beginner tutorials + checked the official documentation to get to know Wayfinder.
Now I have an issue which is getting quite frustrating, I am trying to output this (see 3rd li item):
<ul id="nav" class="cf">
<li><a href=".">home</a></li>
<li><a href="#">this</a></li>
<li class="selected"><a class="nav_on" href="#">that</a></li>
<li><a href="#">this</a></li>
</ul>
Why do I need this structure ? Simply because .selected is for tinynav.js (i.e. script for responsive menus) while .nav_on is a class that highlights the current active menu element (displays an horizontal colored line above active menu element).
Thus I have created the following chunks :
&outerTpl:
<ul id="nav" class="cf">[[+wf.wrapper]]</ul>
and
&rowTpl:
<li [[+wf.classes]]><a [[+wf.classes]] href="[[+wf.link]]">[[+wf.linktext]]</a>[[+wf.wrapper]]</li>
And here is the wayfinder call in my template :
[[!Wayfinder?
&startId=`0`
&outerTpl=`menu_Outer`
&rowTpl=`menu_Row`
&innerTpl=`menu_Inner`
&innerRowTpl=`menu_InnerRow`
&webLinkClass=`nav_on`
&hereClass=`selected`
&firstClass=``
&lastClass =`` ]]
But no matter what I try with the parameters (&hereClass, &selfClass, etc.), I can only get either the class names duplicated in both the <li> and <a> or just one class but that gets duplicated too. So this is what I get:
<ul id="nav" class="cf">
<li ><a href=".">home</a></li>
<li ><a href="index.php?id=4">this</a></li>
<li class="selected"><a class="selected" href="index.php?id=6">that</a></li>
<li ><a href="index.php?id=7">this</a></li>
</ul>
Details: using Revo 2.2
Is there any way to do this ? I'm short of ideas now ...
I probably didn't grasp some of the concepts so please, be gentle
Thanks in advance for your kind help!