rutt wrote:
> 
> Basically, if the first element of the path is a valid controller, then
> the request should be dispatched to that controller.  If not, it should be
> dispatched to RootController.  
> 

Not sure if this will get you where you want to go, but my first thought was
setting up a plugin to test whether or not a request was dispatchable, and
setting the controller to 'root' if it isn't dispatchable.

class My_Controller_Plugin_Example extends Zend_Controller_Plugin_Abstract {
  
  public function preDispatch(Zend_Controller_Request_Abstract $request) {
    
    $frontController = Zend_Controller_Front::getInstance();
    $isDispatchable  =
$frontController->getDispatcher()->isDispatchable($request);

    if (!$isDispatchable) {
      $controller = 'root';
      $request->setControllerName($controller);
    }
    
  }
}


-----
Jeremy Kendall --  http://www.jeremykendall.net http://www.jeremykendall.net 
-- 
View this message in context: 
http://www.nabble.com/Routing%3A-actions-as-first-element-of-path-tp20908784p20913704.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to