I know how to use multiple layouts (per Controllers and per Modules).
I have 5 diffirent layouts and they switch fine every time I call diffirent module. But the problem is I see they all have SOME portion of common code (like doctype, stylesheets etc.)
Will you tell me if Zend allows using multiple layouts but setting the common root for them? Now if i want to add stylesheet I need to modify 5 diffirent layouts what I belive could be done in a better manner.
Thanks in advance.
I usually create a wrapper layout that renders the content with sublayouts.
create as many sublayouts as you need with one default so you don’t have to set it if you don’t need to.
/application
/layouts
wrapper.phtml
/sublayouts
default.phtml
In wrapper.phtml:
In sublayouts/default.phtml (add anything):