I had to create method in Boostrap which bootstraps Layout resource and registers some view helpers.
protected function _initViewHelpers() {
$this->bootstrap('layout');
$layout = $this->getResource('layout');
$view = $layout->getView();
$view->registerHelper(new Application_View_Helper_LoadMenu, 'loadMenu');
$view->registerHelper(new Application_View_Helper_InfoLink, 'infoLink');
$view->registerHelper(new Application_View_Helper_InfoData, 'infoData');
}
Now, I am passing some variables to layout (to Zend_View instance, as always), but layout doesn't recognize that it has them.
When I move code which registers helpers, to init() method in controller, everything is ok. Is it ZF error or I did sth wrong?
In Your Controller (or wherever you have view)
In Your Layout
if i'm missing some part of your question let me know.
Edit: failing the above, the other correct way to do this would be to use the placeholder helper (http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.initial.placeholder)
Edit 2: Make sure you are bootstrapping view as well.