Hey Guys,
Sorry if im missing something obvious but I know as standard the class="active" is on the "li" but is it possible for me to have it on the link A tag?
eg. <li><a class="active" etc
Cheers
Brett
-
MODX Staff
- 12,272 Posts
Yes, just create a new template for the here row using the relevant parameter.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
Thanks for replying but your need to be more specific, im still very new to modx, loving it though but still new and learning...
Cheers
Hi Ryan,
thanks for replying but im struggling to find any reference to the "here row" that you mentioned, sorry if im being naive.
Brett
Hi Ryan,
Thank you thats perfect, just one hiccup, the class "last" isnt getting applied now to the last li element?
When I tried adding class="[+wf.classnames+]" its adding both last & active to the il?
So I have this - <li class="[+wf.classnames+]"><a class="active">[+wf.linktext+]</a></li>
Can anyone help me at all? At a loose end :-(
Cheers
Brett
Brett,
Maybe it would be better if you posted here all the WF template chunks you are using (including type, i.e. rowTpl, etc) plus your WF call for closer inspection. It might be a case whereby there’s 2 or more WF templates applicable to a certain menu items and both will not be applied...WF has a specific template processing order. In addition, mention the version of WF you are using and if any of your menu items are weblinks.
cheers/k
Hi Kongondo,
Im just using the one bit of code for my naivgation:
[!Wayfinder?&startId=`0`&level=1&titleOfLinks=`longtitle` &hereTpl=`menuActive`!]
menuActive chunk:
<li class="[+wf.classnames+]"><a class="[+wf.classnames+]">[+wf.linktext+]</a></li>
This is what my problem outputted html is:
<ul>
<li><a href="/index.php" title="" >Home</a></li>
<li><a href="/index.php?id=2" title="" >About Us</a></li>
<li><a href="/index.php?id=3" title="" >Our Work</a></li>
<li class="last active"><a class="last active">Contact Us</a></li>
</ul>
Just to add to my problem, the active class isnt being applied to the "a" tag on a parent that has a childredirect snippet being applied to?
Thanks Kongondo for any help you can give me?
Brett