I usually use a placeholder/partial directly in the view script for things
like this. In fact i never even thought to go abotu it in the way you are
doing.
so in my layout.phtml i might have something like:
?php echo $this-placeholder('sidebar'); ?
and in my index.phtml i would have:
?php
I don't know if this is a better way, but you could call
$this-_helper-viewRenderer-setNoRender(false) after the render('sidebar')
call. The noRender flag is always set to true after calling render once. The
behavior is hard coded in the ViewRenderer helper and there's no option to
turn it off.
Hi,
I use Zend_Layout and I need to render a different 'navbar' accordingly to
the active action. I simply wrote this in my layout.phtml file :
?php echo $this-layout()-sidebar; ?
Then, in every action that needs to display a sidebar, I have :
$this-render('sidebar', 'sidebar');
This