Zend router config xml, shortcut?

By : def
Source: Stackoverflow.com
Question!

I have an xml like this

<configdata>
    <routes>
        <home type="Zend_Controller_Router_Route">
            <route>home</route>
            <defaults>
                <controller>index</controller>
                <action>index</action>
            </defaults>
        </home>
    </routes>
</configdata>

Now this works but I'd like to give each rout a shortcut like you would add in bootstrap like this..

$router->addRoute('shortcut_key',$route);

How can I do this in the config xml?

By : def


Answers

On your bootsrap.php...

protected function _initRoutes()
 {
  $routefile = new Zend_Config_Xml(APPLICATION_PATH.'/routes.xml');
  $router = Zend_Controller_Front::getInstance()-
By : coolguy


This video can help you solving your question :)
By: admin