Need help with Zend Navigation XML

I am currently developing a web application. Which consist of an interface interface and an interface.

Therefore, I would have two separate navigation, one for the interface and one for the backend.

So what is the best way to achieve this? Does Zend 2 Support a Separate Zend Navigation Object?

Thank you for this in advance!

Here is my Zend navigation code in bootstrap.php

protected function _initNavigation()
{
    $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);

    }

Here is my view code

<?php echo $this->navigation()->menu()
+3
source share
1 answer

Of course, he supports it :) I think you are using modules, right? By default and admin ... Just create a boot file

class Default_Bootstrap extends Zend_Application_Module_Bootstrap {}

... and ...

class Admin_Bootstrap extends Zend_Application_Module_Bootstrap {}

... in which you can create navigation for each module separately.

If you are not using modules, just create two objects

$navigation = new Zend_Navigation($config);
$navigationAdmin = new Zend_Navigation($configAdmin);
+1
source

All Articles