--- Mvc.php-orig 2010-01-15 08:06:10.000000000 -0500 +++ Mvc.php 2010-01-15 09:14:37.000000000 -0500 @@ -131,6 +131,14 @@ if (!$this->_active) { $front = Zend_Controller_Front::getInstance(); $reqParams = $front->getRequest()->getParams(); + $routeParams = array(); + + if ($front->getRouter()->hasRoute($this->getRoute())) { + // To avoid false-negatives we will build the $myParams using the route's defaults + // instead of the controller's defaults if the module, controller, and/or + // action is not already provided in the navigation configuration. + $routeParams = $front->getRouter()->getRoute($this->getRoute())->getDefaults(); + } if (!array_key_exists('module', $reqParams)) { $reqParams['module'] = $front->getDefaultModule(); @@ -140,18 +148,24 @@ if (null !== $this->_module) { $myParams['module'] = $this->_module; + } elseif (isset($routeParams['module'])) { + $myParams['module'] = $routeParams['module']; } else { $myParams['module'] = $front->getDefaultModule(); } if (null !== $this->_controller) { $myParams['controller'] = $this->_controller; + } elseif (isset($routeParams['controller'])) { + $myParams['controller'] = $routeParams['controller']; } else { $myParams['controller'] = $front->getDefaultControllerName(); } if (null !== $this->_action) { $myParams['action'] = $this->_action; + } elseif (isset($routeParams['action'])) { + $myParams['action'] = $routeParams['action']; } else { $myParams['action'] = $front->getDefaultAction(); }