Hello,

Thanks for the reply.

I get this error:

Fatal error: Call to a member function setMinDepth() on a non-object in
/opt/apache2...

When I placed setMinDepth(0)...

echo $this->navigation()->breadcrumbs()->render()->setMinDepth(0);


These are the pages I am testing the breadcrumb on:

modue=>default
controller=>index
action=>index
And on
modue=>default
controller=>dashboard
action=>index

EG:

http://mysite.com/myapp/public/dashboard


The correct array is:

$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
                ));

But still the same behavior.

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:
>> 

>> $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();
>> 
>> 

>> 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"?

>>>> I have tried to do this in my layout and views but it outputs nothing.
>>>> 

>>>> echo $this->navigation()->breadcrumbs();
>>>> 

>>>> There are no error messages or whatsoever.

>>>> The manual says that it should work. But apparently, it isn't.

>>>> http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.initial.navigation.breadcrumbs
>>>> 

>>>> Any thoughts?

>>>> 

>>>> Thanks,
>>>> Wenbert
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 


-----
http://blog.ekini.net
-- 
View this message in context: 
http://www.nabble.com/Navigation-Breadcrumbs-Helper-not-displaying-tp23555359p23701223.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to