My website contains lots of blocks which are located in different positions for all pages. Obviously I don't want to code this for all controllers or for each view. I want to, from the view, do something like this:
Code: Select all
<div>
<div class="block"><?= $this->block1 ?></div>
<div class="block"><?= $this->block2 ?></div>
....
</div>Code: Select all
<?php
class Zend_View_Helper_MyHelper
{
public function myHelper() {
// Perform some logic here from the Model
return "
<h2>Block title</h2>
<p>....</p>
<p>....</p>
....";
}
}Thanks