So I started to learn Zend Framework 1 and run in to some problem, with passing a values in a View. I created a simple variable in IndexContoller like this:
class IndexController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
$this->view->content = "Lorem ipsum";
}
}
And then I called it in a layout like this:
<div class="carousel-caption">
<h2><?php echo $this->layout()->content; ?></h2>
</div>
It returns nothing, when I do var dump
var_dump($this->layout()->content)
I get this back:
string(0) ""
How to fix this?