[MANUAL] English:
[zend.git] / documentation / manual / en / module_specs / Zend_Navigation-Introduction.xml
blob147d9c005a0966599ce8dd5cbdac3934ebf017fd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Reviewed: no -->
3 <sect1 id="zend.navigation.introduction">
4     <title>Introduction</title>
6     <para>
7         <classname>Zend_Navigation</classname> is a component for managing
8         trees of pointers to web pages.
9         Simply put: It can be used for creating menus, breadcrumbs, links, and
10         sitemaps, or serve as a model for other navigation related purposes.
11     </para>
13     <sect2 id="zend.navigation.introduction.concepts">
14         <title>Pages and Containers</title>
16         <para>
17             There are two main concepts in <classname>Zend_Navigation</classname>:
18         </para>
20         <sect3 id="zend.navigation.introduction.pages">
21             <title>Pages</title>
23             <para>
24                 A page (<classname>Zend_Navigation_Page</classname>) in
25                 <classname>Zend_Navigation</classname> –
26                 in its most basic form – is an object that holds a pointer
27                 to a web page. In addition to the pointer itself, the page
28                 object contains a number of other properties that are
29                 typically relevant for navigation, such as <code>label</code>,
30                 <code>title</code>, etc.
31             </para>
33             <para>
34                 Read more about pages in the
35                 <link linkend="zend.navigation.pages">pages</link>
36                 section.
37             </para>
38         </sect3>
40         <sect3 id="zend.navigation.introduction.containers">
41             <title>Containers</title>
43             <para>
44                 A navigation container
45                 (<classname>Zend_Navigation_Container</classname>) is a
46                 container class for pages. It has methods for
47                 adding, retrieving, deleting and iterating pages.
48                 It implements the <ulink url="http://php.net/spl">SPL</ulink>
49                 interfaces <classname>RecursiveIterator</classname> and
50                 <classname>Countable</classname>, and can thus be iterated
51                 with SPL iterators such as
52                 <classname>RecursiveIteratorIterator</classname>.
53             </para>
55             <para>
56                 Read more about containers in the
57                 <link linkend="zend.navigation.containers">containers</link>
58                 section.
59             </para>
61             <note>
62                 <para>
63                     <classname>Zend_Navigation_Page</classname> extends
64                     <classname>Zend_Navigation_Container</classname>, which
65                     means that a page can have sub pages.
66                 </para>
67             </note>
68         </sect3>
69     </sect2>
71     <sect2 id="zend.navigation.introduction.separation">
72         <title>Separation of data (model) and rendering (view)</title>
74         <para>
75             Classes in the <classname>Zend_Navigation</classname>
76             namespace do not deal with rendering of navigational elements.
77             Rendering is done with navigational view helpers. However,
78             pages contain information that is used by view helpers
79             when rendering, such as; label, <acronym>CSS</acronym> class, title,
80             <code>lastmod</code> and <code>priority</code> properties for
81             sitemaps, etc.
82         </para>
84         <para>
85             Read more about rendering navigational elements in
86             the manual section on
87             <link linkend="zend.view.helpers.initial.navigation">navigation
88             helpers</link>.
89         </para>
90     </sect2>
91 </sect1>