[MANUAL] English:
[zend.git] / documentation / manual / en / tutorials / view-placeholders-intro.xml
blob46746bb9842441b539925a7d194a066e4f1d1fa0
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Reviewed: no -->
3 <sect1 id="learning.view.placeholders.intro">
4     <title>Introduction</title>
6     <para>
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:
10     </para>
12     <itemizedlist>
13         <listitem>
14             <para>
15                 How do you alter the page title?
16             </para>
17         </listitem>
19         <listitem>
20             <para>
21                 How would you inject conditional scripts or stylesheets into the sitewide layout?
22             </para>
23         </listitem>
25         <listitem>
26             <para>
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?
29             </para>
30         </listitem>
31     </itemizedlist>
33     <para>
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.
40     </para>
41 </sect1>