This is easier than it seems, and pretty cool too!
A great use for this type of thing would be for instance a Navigation Breadcrumbs section.

In your controller, you would add something similar to the following:

Zend_Layout::getMvcInstance()->assign('nav', '<a href="/home">Home</a> | <a href="/something">Something Else</a>');

Then in your layout.phtml or view partial, you can say:

if(isset($this->layout()->nav)){echo $this->layout()->nav; }

More awesomeness! We hope you enjoyed your meal. Be sure to drop by again!

Advertisements