|
|||
|
Is there a way to store a view in a phtml file and then render it as part of another view? For example, if I have a menu or footer that is common to all of the pages on my site and I want to keep it in one phtml file so that I can change it in one place and it will change everywhere. I can't find anything about doing this in the documentation.
|
|
|||
|
Sure, you just need to call the render method in your view script file like this:
PHP Code:
More info here: Zend Framework: Documentation |
|
||||
|
Also, outside of Zend_Layout is the Partial helper for Zend_View. So if you need other repeatable elements that isn't apart of your site wide template (layout), then partials are the way to go: Zend Framework: Documentation: Zend_View (Scroll down to this section: 41.4.1.2. Partial Helper)
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|