sorry i think it shld be echo $this->navigation()->breadcrumbs()->setMinDepth(0)->render();
wenbert wrote: > > Hello, > <br> > Thanks for the reply. > <br> > I get this error: > <pre> > Fatal error: Call to a member function setMinDepth() on a non-object in > /opt/apache2... > </pre> > When I placed setMinDepth(0)... > <pre> > echo $this->navigation()->breadcrumbs()->render()->setMinDepth(0); > </pre> > > These are the pages I am testing the breadcrumb on: > <pre> > modue=>default > controller=>index > action=>index > And on > modue=>default > controller=>dashboard > action=>index > </pre> > EG: > <pre> > http://mysite.com/myapp/public/dashboard > </pre> > > The correct array is: > <pre> > $pages = array( > array( > 'label' => 'Home', > 'title' => 'Go Home', > 'module' => 'default', > 'controller' => 'index', > 'action' => 'index', > 'order' => -100 // make sure home is the first > page > ), > array( > 'label' => 'Dashboard', > 'module' => 'default', > 'controller' => 'dashboard', //i corrected this > part > 'action' => 'index' //i corrected > this part > )); > </pre> > But still the same behavior. > <br> > I am using ZF 1.8.1. > > > iceangel89 wrote: >> >> what page are you on? >> >> maybe also try >> >> echo $this->navigation()->breadcrumbs()->render()->setMinDepth(0); >> >> >> wenbert wrote: >>> >>> Hi iceangel89, >>> >>> Thanks, I have this code in layout.phtml for testing: >>> <pre lang="php"> >>> $pages = array( >>> array( >>> 'label' => 'Home', >>> 'title' => 'Go Home', >>> 'module' => 'default', >>> 'controller' => 'index', >>> 'action' => 'index', >>> 'order' => -100 // make sure home is the first page >>> ), >>> array( >>> 'label' => 'Dashboard', >>> 'module' => 'default', >>> 'controller' => 'index', >>> 'action' => 'dashboard' >>> )); >>> $container = new Zend_Navigation($pages); >>> $this->navigation($container); >>> >>> echo $this->navigation()->breadcrumbs()->render(); >>> >>> </pre> >>> All I get from the echo is a "\n". Can anyone reproduce this? >>> >>> Thanks, >>> Wenbert >>> >>> >>> iceangel89 wrote: >>>> >>>> u still need to create something like a sitemap. >>>> >>>> http://framework.zend.com/manual/en/zend.navigation.containers.html#zend.navigation.containers.creating >>>> >>>> >>>> >>>> wenbert wrote: >>>>> >>>>> Is the built-in breadcrumbs helper supposed to work >>>>> "out-of-the-box"?<br /> >>>>> I have tried to do this in my layout and views but it outputs nothing. >>>>> <pre> >>>>> echo $this->navigation()->breadcrumbs(); >>>>> </pre> >>>>> There are no error messages or whatsoever.<br /><br /> >>>>> The manual says that it should work. But apparently, it isn't.<br /> >>>>> http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.initial.navigation.breadcrumbs >>>>> <br /> >>>>> Any thoughts?<br /> >>>>> <br /> >>>>> Thanks, >>>>> Wenbert >>>>> >>>> >>>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/Navigation-Breadcrumbs-Helper-not-displaying-tp23555359p23701798.html Sent from the Zend Framework mailing list archive at Nabble.com.
