There is a method isActive()
in Zend_Navigation
. But it returns true for all the elements in the current path
(parent li
is active and all the children too, even when the current is parent li
).
Is there any method like isCurrent()
, to determine whether the current menu item is the current page?
I just like to add custom class attribute to just one, current element in the whole nested tree of ul's and li's.
isActive()
should return true only for the current page, not parent or child pages. – Clothes