A: 

You can use the helper broker to get an instance of the view. Something like this should work:

Zend_Controller_Action_HelperBroker::getExistingHelper('ViewRenderer')->view->foo = 'bar';
alexn
it tells Fatal error: Call to undefined method stdClass::getScriptPaths() in C:\wamp\www\OutOfScopes\OutOfScopes\library\Zend\Controller\Action\Helper\ViewRenderer.php on line 489what does that mean?
gilgitik
+1  A: 

Try this:

$view = Zend_Layout::getMvcInstance()->getView();
$view->controllerName = $request->getControllerName();
Gordon
A: 

Take this example as basis:

class Plugin_Sidebar extends Zend_Controller_Plugin_Abstract {

    public function postDispatch(Zend_Controller_Request_Abstract $request)
    {
        if($request->getModuleName() == 'admin')
        {
            return;
        }

        $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
        if (null === $viewRenderer->view) {
            $viewRenderer->initView();
        }
        $view = $viewRenderer->view;


        $Categories = new Model_DbTable_Categories();
        $view->menuItens = $Categories->getMenu();

    }
}
Keyne