Prev | Current Page 98 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"


The list of departments and search box are elements that will be present in every page of
the site. The list of categories appears only when the visitor selects a department from the list.
The contents cell is a dynamic part of the web site that will update itself with varying content
depending on the site location (Home, About Us, Products, etc.) requested by the visitor. There
are two main options for implementing that cell: add a componentized template that changes
itself depending on the location or use different componentized templates to populate the cell
depending on the location being browsed. There is no rule of thumb about which method to
CHAPTER 3 ?–  STARTING THE TSHIRTSHOP PROJECT 41
use, because the decision mainly depends on the specifics of the project. For TShirtShop, we
will use the second option and create a number of componentized templates that will fill that
location.
In the remainder of this chapter, you will
??? Create the front page of TShirtShop
??? Implement the foundations of the error-handling system in TShirtShop
??? Create the tshirtshop database
Building TShirtShop??™s Front Page
The front page in TShirtShop will be generated by the files index.php and store_front.tpl.
You??™ll write the store_front.tpl Smarty template with placeholders for the three major parts
of the site??”the header, the table of departments, and the page contents cell.


Pages:
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110