I have just done something similiar, as I primarily thought this is what
Zend_Layout would do, basically I have the layout include a common header
and footer.
I know this is going back to the dark ages a little but it seemed like the
simplest fashion, and if you don't want a layout to use the standard header
and footer you simply delete the include from the layout.
I store everything in skins/layoutname and store the common header and
footer in skins/
skins
-- admin
-- default
-- header.php
-- footer.php
So each actual layout is a design in a skin, and the layout path is the
skin. For instance the default would be skins/admin/layout.php But if you
wanted a compact admin skin, you'd change the layout Zend_Layout would look
for to compact thus giving skins/admin/compact.php
Therefore the header/footer system seems to work well:
<?php // Include the common header
echo $this->render('../header.php'); ?>
I don't know if this is perfect and it probably has lots of downsides but it
works for me, I'm interested to hear others takes on 'skinning' with
Zend_Layout. I realise people might be dubious of having designers add the
render call, but they have to add the calls to display content so....!
Simon
Jeffrey Sambells-2 wrote:
>
> Hi All,
>
> I'm just playing with Zend_Layout and have a quick question. What I'd
> like to do is have a three part view. I'd like my designer to design a
> wrapper "template" that consists of the markup surrounding the output
> of action views. This is exactly what Zend_Layout does so perfect! but
> if possible I'd like the designer templates to exclude the doctype,
> head and <html> and <body> tag stuff and stick strictly to what comes
> after <body>. That way designers don't need to worry about the non-
> design stuff.
>
-----
Simon Corless
http://www.ajb007.co.uk/
--
View this message in context:
http://www.nabble.com/Zend_Layout-with-nested-layout--tp15878224s16154p15912865.html
Sent from the Zend Framework mailing list archive at Nabble.com.