1 <?xml version="1.0" encoding="UTF-8"?>
3 <sect1 id="learning.view.placeholders.intro">
4 <title>Introduction</title>
7 In <link linkend="learning.layout">the previous chapter</link>, we looked at primarily the
8 Two Step View pattern, which allows you to embed individual application views within a
9 sitewide layout. At the end of that chapter, however, we discussed some limitations:
15 How do you alter the page title?
21 How would you inject conditional scripts or stylesheets into the sitewide layout?
27 How would you create and render an optional sidebar? What if there was some content
28 that was unconditional, and other content that was conditional for the sidebar?
34 These questions are addressed in the <ulink
35 url="http://java.sun.com/blueprints/corej2eepatterns/Patterns/CompositeView.html">Composite
36 View</ulink> design pattern. One approach to that pattern is to provide "hints" or content
37 to the sitewide layout. In Zend Framework, this is achieved through specialized view helpers
38 called "placeholders." Placeholders allow you to aggregate content, and then render that
39 aggregate content elsewhere.