Zend: How can I globally set the current navigation item?

i range i

New Member
config:\[code\]resources.frontController.plugins.nav = "WD_Controller_Plugin_Nav"\[/code\]bootstrap:\[code\]protected function _initAutoloader() {$loader = Zend_Loader_Autoloader::getInstance();$loader->registerNamespace('WD_');return $loader;}protected function _initNav() { $this->bootstrap('layout'); $layout = $this->getResource('layout'); $view = $layout->getView(); $config = new Zend_Config_Xml( APPLICATION_PATH . '/configs/navigation.xml', 'nav'); $navigation = Zend_Navigation( $config ); $fc = Zend_Controller_Front::getInstance(); $fc->registerPlugin( new WD_Controller_Plugin_Nav() ); $view->navigation( $navigation );}\[/code\]library/WD/Controller/Plugin/Nav.php:\[code\]class WD_Controller_Plugin_Nav extends Zend_Controller_Plugin_Abstract { public function postDispatch() { $uri = $this->_request->getPathInfo(); $view = Zend_Layout::getMvcInstance()->getView(); $activeNav = $view->navigation()->findByUri($uri)->setActive(true); }}\[/code\]web output:\[quote\] Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'FindByUri' was not found in the registry\[/quote\]I pretty much know what I'm doing wrong, in that I'm referencing the Zend View Helper Navigation and not the Navigation directly ( findByUri method exists in Zend_Navigation directly ), but I'm not sure how to properly reference it.
 
Back
Top