Prev | Current Page 101 | Next

Rob Allen, Nick Lo, and Steven Brown

"Zend Framework in Action"

The model has encapsulated all the details of dealing with the database, leaving the
controller to work at the ???business logic??? level. This is the MVC separation at work and so the controller only
needs to worry about linking the model data to the view and then asking the view to render itself.
Licensed to Menshu You
Please post comments or corrections to the Author Online forum at
http://www.manning-sandbox.com/forum.jspa?forumID=329
3.4.4 Using the view to display the home page
The first cut of the home page is very simple. We just need to display our list of places with reviews in date
reversed order. In order to do this, we need to develop the master site template, an associated CSS file and the
actual action content template itself.
3.4.5 Site.phtml: The master layout template
Let??™s start with the master template, site.phtml and include some basic styling. For Places, we are going to use
a three column layout to allow for a left hand menu, main content and space for adverts on the right hand side.
The master template, shown in Listing 3.9, is a simple XHTML file which uses CSS to style the layout of the
site.
Listing 3.9: Site.phtml: the master view template file
"http://www.


Pages:
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
basketball.sport24x7.net zakłady bukmacherskie ranking kasyn ranking przeglądarek parasole