Chapter 14. Constructing complex web pages

14.1 Combining templates (Composite View) 325
14.2 Implementing a straightforward composite view 326
14.3 Composite View examples 332
14.4 Summary 337

A complex web page is like a zoo. There may be all sorts of different creatures, all with different habits and requiring different care, cleaning, and feeding. Some of them are in cages (typically the stuff that surrounds the main content, such as banners, ads, menus, and various kinds of sidebars); some of them range freely on the main expanse of the page.

Keeping all these coordinated is one of the great challenges of web programming.

In addition, different species play together. A menu may need to communicate with a news list as well as with itself. ...

Get PHP in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.