1 <?xml version="1.0" encoding="UTF-8"?>
3 <sect1 id="zend.dojo.view" xmlns:xi="http://www.w3.org/2001/XInclude">
4 <title>Dojo View Helpers</title>
7 Zend Framework provides the following Dojo-specific view helpers:
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.
20 <example id="zend.dojo.view.setup">
21 <title>Using Dojo View Helpers</title>
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>:
29 <programlisting language="php"><![CDATA[
30 $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
34 Alternately, you can use <classname>Zend_Dojo</classname>'s
35 <methodname>enableView()</methodname> method to do the work for you:
38 <programlisting language="php"><![CDATA[
39 Zend_Dojo::enableView($view);
43 <xi:include href="Zend_Dojo-View-Dojo.xml" />
44 <xi:include href="Zend_Dojo-View-Helpers.xml" />