|
|||
|
Hello all,
This might not be a big deal, but I want to know if anyone else has a better way to do this. (BTW, this is my first day in ZF, and i'm following the screencast). Before ZF, when I develop my php applications, at the beginning of each file I do printHeader(); and at the end printFooter(); These function would print the HTML header, containing the logo and menu links, and the HTML footer containing a disclaimer. Is there a better/more efficient/cleaner way to do this using ZF? or am I going to have to, for example, declare a UI class, where I have UI.getHeader, UI.getFooter, UI.drawRoundedBox, etc. What is your method/technique? |
|
||||
|
We use Zend_Layout in ZF
basically there is a global layout contain everything but variables to where content should go. Layouts are containers for what the actions will generate. Normally your doing echo header echo content echo footer In zend layout, echo content, take content and place in layout, then echo everything
__________________
Zym Framework - A Zend Framework extension library w/ demo app SpotSec Blog: http://spotsec.com/blog |
![]() |
| Thread Tools | |
| Display Modes | |
|
|