PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Standard Placeholders

In the previous section, we learned about the placeholder() view helper, and how it can be used to aggregate custom content. In this section, we'll look at some of the concrete placeholders shipped with Zend Framework, and how you can use them to your advantage when creating complex composite layouts.

Most of the shipped placeholders are for generating content for the <head> section of your layout content -- an area you typically cannot manipulate directly via your application view scripts, but one you may want to influence. As examples: you may want your title to contain certain content on every page, but specific content based on the controller and/or action; you may want to specify CSS files to load based on what section of the application you're in; you may need specific JavaScript scripts loaded at different times; or you may want to set the DocType declaration.

Zend Framework ships with placeholder implementations for each of these situations, and several more.

Zend Framework