I am trying to create a sidebar in my layout that has the behavior of a placeholder. I want to be able to define the contents of this placeholder once per controller. So every controller can add custom content to the sidebar but without the need to define it in any view.
I am kind of confused on how to go about that with Zend_Layout. Any help?
How about adding a
postDispatch()call to each controller?This function will be called after your action completes. For more info, see Pre- and Post-Dispatch Hooks.