Hello everyone, THe solution is to use the dispatchLoopStartup method in the Controller_Plugin_Menu, and there to use the Zend_Controller_Plugin_ActionStack plugin, as this plugin "operates as a postDispatch plugin"(from the manual). This means that all the variables set from the requested by the browser action, will be available to the menu controller. --- On Thu, 4/30/09, lightflowmark <[email protected]> wrote:
From: lightflowmark <[email protected]> Subject: Re: [fw-general] Menu in ZF: Controller Plugin with postDispatch method To: [email protected] Date: Thursday, April 30, 2009, 4:12 PM The way I do something similar is to run code in dispatchLoopStartup like $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer'); $viewRenderer->init(); $view = $viewRenderer->view; $this->_view = $view; // set up common variables for the view $view->originalModule = $request->getModuleName(); $view->originalController = $request->getControllerName(); $view->originalAction = $request->getActionName(); I also set up my actionstack in dispatchLoopStartup. In my menuAction, I can then compare my menu items with $view->originalAction, etc. and colour them appropriately. Don't know if this is a good solution or not, but it is working for me. -- View this message in context: http://www.nabble.com/Menu-in-ZF%3A-Controller-Plugin-with-postDispatch-method-tp23306086p23315051.html Sent from the Zend Framework mailing list archive at Nabble.com.
