Reputation: 26107
How can I assign a view variable during the postDispatch method of the controller in Zend Framework?
Upvotes: 0
Views: 139
Reputation: 2817
class Your_Class extends Zend_Controller_Plugin_Abstract
{
public function postDispatch(Zend_Controller_Request_Abstract $request)
{
$layout = Zend_Layout::getMvcInstance();
$view = $layout->getView();
$view->variable = 'some value';
}
}
Upvotes: 1