Sunday, February 19, 2012

Adding a new Route in Zend Framework

$Router = $this->_front->getRouter();

$CategoryRoute = new Zend_Controller_Router_Route('category/:category/:controller/:action/*',
    array(
        'controller' => 'index',
        'action'     => 'index',
        'category'   => null
    )
);
$Router->addRoute('category', $CategoryRoute);

No comments:

Post a Comment