I have a Controller, Layout, Custom view helper. I'm passing a data from controller $this->view->foo = 'foo';
normally I get it on my layout.phtml,here I'm calling a custom view helper $this->navbar();
on layout.
How can I access that foo
within my view helper?
<?php
class Zend_View_Helper_Navbar extends Zend_View_Helper_Abstract
{
public function setView( Zend_View_Interface $view )
{
$view = new Zend_View();
$view->setScriptPath(APPLICATION_PATH . '/views/scripts/partials/');
$this->_view = $view;
}
public function navbar()
{
return $this->_view->render('navbar.phtml');
}
}
this is my view helper