Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Not an Issue
-
Affects Version/s: 1.8.0
-
Fix Version/s: None
-
Component/s: Zend_Controller, Zend_Navigation
-
Labels:None
Description
I'm using the Zend_Navigation to build a menu, this is build in the bootstrap file.
One of the pages go's to a route, when i'm in that routed page al href's of the pages into my menu go's to that route and not the right module / controller / view..
Here's the code
$pages = array( array( 'label' => 'Company', 'title' => 'About us', 'module' => 'newmodule', 'controller' => 'index', 'action' => 'index', 'pages' => array( array( 'label' => 'News', 'class' => 'rss', // class 'module' => 'newmodule', 'controller' => 'index', 'action' => 'index', 'pages' => array( array( 'label' => 'Archive', 'route' => 'blaat', // route 'module' => 'newmodule', 'controller' => 'index', 'action' => 'hallow', 'params' =>array("year"=>"2009") ) ) ) ) ), ); $view->navigation()->addPages($pages); $router = $frontController->getRouter(); $router->addDefaultRoutes(); $router->addRoute( 'blaat', new Zend_Controller_Router_Route( '/archive/:year', array( 'module' => 'newmodule', 'controller' => 'index', 'action' => 'hallow', 'year' => (int) date('Y') - 1 ), array('year' => '\d+') ) );
I have the problem with the $this->navigation()->menu(); function
When I first call $page1->getHref(); and then the menu function the problem don't appears