ZF2 Breadcrumbs not showing

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ZF2 Breadcrumbs not showing

erkinaka
i have navigation in my module.config.php like below;

return array(        
    'navigation' => array(
        'default' => array(
            array(
                'controller' => 'index',
                'module'=>'default',
                'action' => 'index',
                'label' => 'Ana Sayfa',
                'route' => '/',
                'resource' => 'index',
                'class' => 'anasayfa',
            ),
            array(
                  'module'=>'default',
                'controller' => 'konugoster',
                'action' => 'index',
                'label' => 'Konular',
                'route' => '/konugoster',
                'resource' => 'konugoster',
                'class' => 'konular',
                'pages' => array(
                    array(
                          'module'=>'default',
                        'controller' => 'konugoster',
                        'action' => 'index',
                        'label' => 'Konular',
                        'route' => '/konugoster',
                        'resource' => 'konu',
                        'privilege' => 'konu',
                    ),
                    array(
                        'module'=>'default',
                        'controller' => 'konu',
                        'action' => 'index',
                        'label' => 'Konuları Düzenle',
                        'route' => '/konu/index',
                        'resource' => 'konu',

                        'privilege' => 'konu',
                    ),
                    array(
                          'module'=>'default',
                        'controller' => 'konu',
                        'action' => 'add',
                        'label' => 'Konu Ekle',
                        'route' => '/konu/add',
                        'resource' => 'konu',
                        'privilege' => 'add',
                    ),
                ),
            ),
)
)

i dont have any problem with rendering menu;
  echo $this->navigation('navigation')->menu()->render();

but breadcrumbs isn't working. i don't hve any error. i think it returns empty and i couldn't find reason.
  echo $this->navigation()->breadcrumbs()->setMinDepth(0)->render();


i have try the solutions which are in the form but i couldn'solve please help me?
Reply | Threaded
Open this post in threaded view
|

Re: ZF2 Breadcrumbs not showing

erkinaka
nobody get this error? i am waiting your answers?
Reply | Threaded
Open this post in threaded view
|

Re: ZF2 Breadcrumbs not showing

Frank Brückner
In reply to this post by erkinaka
Hi,
compare your two lines of code:

>   echo $this->navigation('navigation')->menu()->render();

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

There is a difference!


Kind regards,
Frank

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: ZF2 Breadcrumbs not showing

erkinaka
Hi. I try it like below but it didn't solve problem.

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