[MANUAL] English:
[zend.git] / documentation / manual / en / module_specs / Zend_Dojo-View.xml
blobae65f7ae45a2e5c35dcab46e2f2f3dae5c80c96f
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Reviewed: no -->
3 <sect1 id="zend.dojo.view" xmlns:xi="http://www.w3.org/2001/XInclude">
4     <title>Dojo View Helpers</title>
6     <para>
7         Zend Framework provides the following Dojo-specific view helpers:
8     </para>
10     <itemizedlist>
11         <listitem>
12             <para>
13                 <emphasis><methodname>dojo()</methodname>:</emphasis> setup the Dojo environment
14                 for your page, including dojo configuration values, custom module paths, module
15                 require statements, theme stylesheets, <acronym>CDN</acronym> usage, and more.
16             </para>
17         </listitem>
18     </itemizedlist>
20     <example id="zend.dojo.view.setup">
21         <title>Using Dojo View Helpers</title>
23         <para>
24             To use Dojo view helpers, you will need to tell your view object
25             where to find them. You can do this by calling
26             <methodname>addHelperPath()</methodname>:
27         </para>
29         <programlisting language="php"><![CDATA[
30 $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
31 ]]></programlisting>
33         <para>
34             Alternately, you can use <classname>Zend_Dojo</classname>'s
35             <methodname>enableView()</methodname> method to do the work for you:
36         </para>
38         <programlisting language="php"><![CDATA[
39 Zend_Dojo::enableView($view);
40 ]]></programlisting>
41     </example>
43     <xi:include href="Zend_Dojo-View-Dojo.xml" />
44     <xi:include href="Zend_Dojo-View-Helpers.xml" />
45 </sect1>
46 <!--
47 vim:se ts=4 sw=4 et:
48 -->