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.
I know i'm doing something wrong but since i am new to zend i can't figure out where.
I would be grateful if someone could point me towards the right direction.
The XML Navigation:
<?xml version="1.0" encoding="UTF-8"?>
<configdata>
<nav>
<home>
<label>Home</label>
<controller>index</controller>
<action>index</action>
<pages>
<about>
<label>About</label>
<controller>index</controller>
<action>about</action>
</about>
<board>
<label>Executive Committee</label>
<controller>index</controller>
<action>committee</action>
</board>
<events>
<label>Events</label>
<controller>index</controller>
<action>events</action>
</events>
<member>
<label>CNFS Members</label>
<controller>index</controller>
<action>member</action>
</member>
<news>
<label>Blog</label>
<controller>blog</controller>
<action>index</action>
</news>
<contact>
<label>Contact</label>
<controller>index</controller>
<action>contact</action>
</contact>
</pages>
</home>
</nav>
</configdata>
This is the function in the bootstrap file for navigation.
<?php
protected function _initViewNavigation(){
$this->bootstrap('layout');
$layout = $this->getResource('layout');
$view = $layout->getView();
$config = new Zend_Config_Xml(APPLICATION_PATH.'/configs/navigation.xml','nav');
$navigation = new Zend_Navigation($config);
$view->navigation($navigation);
}
?>
This is how i display the breadcrumbs in the view:
<?php echo 'Your are here: ' . $this->navigation()->breadcrumbs() ->setMinDepth(0)->setLinkLast(false)->setSeparator(" / ");?>