Note that there are some explanatory texts on larger screens.

plurals
  1. POZend navigation breadcrumbs
    text
    copied!<p>I have an xml navigation system with article as an element. The breadcrumb works as far as my article page where i display the list of articles with their title (as a link) and a teaser paragraph. The page where i display the full article does not show any breadcrumb navigation. </p> <p>I know i'm doing something wrong but since i am new to zend i can't figure out where. </p> <p>I would be grateful if someone could point me towards the right direction. </p> <p>The XML Navigation:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;configdata&gt; &lt;nav&gt; &lt;home&gt; &lt;label&gt;Home&lt;/label&gt; &lt;controller&gt;index&lt;/controller&gt; &lt;action&gt;index&lt;/action&gt; &lt;pages&gt; &lt;about&gt; &lt;label&gt;About&lt;/label&gt; &lt;controller&gt;index&lt;/controller&gt; &lt;action&gt;about&lt;/action&gt; &lt;/about&gt; &lt;board&gt; &lt;label&gt;Executive Committee&lt;/label&gt; &lt;controller&gt;index&lt;/controller&gt; &lt;action&gt;committee&lt;/action&gt; &lt;/board&gt; &lt;events&gt; &lt;label&gt;Events&lt;/label&gt; &lt;controller&gt;index&lt;/controller&gt; &lt;action&gt;events&lt;/action&gt; &lt;/events&gt; &lt;member&gt; &lt;label&gt;CNFS Members&lt;/label&gt; &lt;controller&gt;index&lt;/controller&gt; &lt;action&gt;member&lt;/action&gt; &lt;/member&gt; &lt;news&gt; &lt;label&gt;Blog&lt;/label&gt; &lt;controller&gt;blog&lt;/controller&gt; &lt;action&gt;index&lt;/action&gt; &lt;/news&gt; &lt;contact&gt; &lt;label&gt;Contact&lt;/label&gt; &lt;controller&gt;index&lt;/controller&gt; &lt;action&gt;contact&lt;/action&gt; &lt;/contact&gt; &lt;/pages&gt; &lt;/home&gt; &lt;/nav&gt; &lt;/configdata&gt; </code></pre> <p>This is the function in the bootstrap file for navigation.</p> <pre><code>&lt;?php protected function _initViewNavigation(){ $this-&gt;bootstrap('layout'); $layout = $this-&gt;getResource('layout'); $view = $layout-&gt;getView(); $config = new Zend_Config_Xml(APPLICATION_PATH.'/configs/navigation.xml','nav'); $navigation = new Zend_Navigation($config); $view-&gt;navigation($navigation); } ?&gt; </code></pre> <p>This is how i display the breadcrumbs in the view:</p> <pre><code> &lt;?php echo 'Your are here: ' . $this-&gt;navigation()-&gt;breadcrumbs() -&gt;setMinDepth(0)-&gt;setLinkLast(false)-&gt;setSeparator(" / ");?&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload