Zend_Navigation add class to active link

evaphyday

New Member
How can I add a class to the active navigation link? If a link points to URI /index/index and the request URI is also /index/index, I would like the link to have class, for example:\[code\]<li class="active"> <a href="http://stackoverflow.com/index/index">Index</a></li>\[/code\]This is how I am initializing navigation in the bootstrap:\[code\]protected function _initNavigation(){$navigation = new Zend_Navigation($this->getOption('navigation'));$this->view->navigation($navigation);}\[/code\]
 
Top