Hi All,
Is there a set way to render a multi-part template with Zend Framework
(I am using version 1.0.3)?
For example: I have an action that renders script: search.phtml.
Search.phtml consists of data specific to search action and lots of
common code such as toolbar, header and footer... Simplistic thinking
would be to just call an "include" from inside the phtml script and
include the header and so on. However I wanted to know if there is
something more efficient/a better way of doing this? Especially when
it comes to populating the variables inside (all of the) the phtml
templates.
For example, can I do:
$this->render('globals/header.phtml');
$this->render();
$this->render('globals/footer.phtml');
I am not sure what HTTP headers are being sent each time I call render
so I don't really want to risk it by calling it multiple times. Also
since I am using 1.0.x branc Zend_Layout component is not really an
option (unless I am missing something).
Any links to online documentation, help and advice on how to correctly
render multi-part templates from an action method would be very
appreciated.
Hope my question makes sense...
Thanks,
Serg