In my project I have a number of dynamic elements that are consistently on every page. I have put these in my layout.phtml
My question is: How can I send variables i
class IndexController extends Zend_Controller_Action
{
public function init()
{
$this->_layout = $this->_helper->layout->getLayoutInstance();
$this->_layout->whatever = $this->view->render('test.phtml);
}
}
In the layout file you can call
layout()->whatever ?>
If in some actions if you don't want that section then:
public function viewAction()
{
$this->_layout->whatever = null;
}