Quote from: kongondo at Jul 15, 2009, 04:06 AM
Quote from: DNA at Jul 15, 2009, 02:27 AM
hhmm...
I have now this:
<li class="active" [+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]" id="[+linkClass+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>
But it still won’t work.
DNA,
What do you mean by it doesn’t work? Does it mean the CSS is not being applied or the tpl?
The TPL isn’t applied. The menu works fine, the css works fine.
But the class="active" isn’t set to the parent item.
Quote from: kongondo at Jul 15, 2009, 04:06 AM
A couple of questions:
1. the <li class="active".....: This might cause a conflict in your CSS since by default, WF will apply the class "active" to all currently active menu items. So, if you are also using that same name, this might bring about undesired effect?
i tried first without setting class="active" in the tpl. But when i don’t do this. WF doesn’t apply an active class to the current menu item.
Quote from: kongondo at Jul 15, 2009, 04:06 AM
2. Is [+linkClass+] a custom placeholder? (it isn’t a WF one)
Unless you want to structure the active parent documents differently, you really don’t need to use activeParentRowTpl. This is because WF will automatically add an "active" class to all currently active menu items - children, parent, grandparent, etc...(it does this using the hereClass).
&hereClass
default: active
values: name of class
description: The hereClass will be applied to the current item and to each parent up the document tree.
So, all you need to do is create some styles for the "active" class. Hope this helps.
cheers/k
Yes, LinkClass is a custom placeholder.
But the hereClass just isnt working here.
My tree:
- HOME
- ITEM1
- ITEM2
- child1
- child2
So when im on child1, the ITEM2 should be active. But it isn’t.
But i have tried to change the active in mij tpl to "current".
But it still don’t work.
My updated hereTpl:
<li class="current"><a href="[+wf.link+]" title="[+wf.title+]" id="[+linkClass+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>
It works when im on a parent page, but when i go to a child page, the parent isn’t active anymore.