Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-10-2008, 04:45 AM
Junior Member
 
Join Date: Feb 2008
Posts: 1
Default Printing headers and footers

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-10-2008, 06:26 AM
SpotSec's Avatar
Senior Member
 
Join Date: Feb 2007
Location: United States
Posts: 121
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:47 AM.