views:

16

answers:

1

I was starting to get a LOT of routes in my bootstrap so I decided to move them to a config file to clean it up. I'm fairly sure I have the syntax correct, but for some reason my route won't work now. Here is my config file:

<config>
    <routes>
        <indextracking type="Zend_Controller_Router_Route">
            <route>crid/:crid</route>
            <defaults>
                <controller>index</controller>
                <action>index</action>
            </defaults>
        </indextracking>
        <internetaccess type="Zend_Controller_Router_Route">
            <route>internet-access</route>
            <defaults>
                <controller>quote</controller>
                <action>index</action>
                <pluginType>1</pluginType>
            </defaults>
        </internetaccess>
    </routes>
</config>

and here is my code from my bootstrap:

protected function _initRoutes()
{
    $router = Zend_Controller_Front::getInstance()->getRouter();
    $router->addConfig(new Zend_Config_Xml(APPLICATION_PATH . '/configs/routes.xml'));
    // More routes below. I only moved over the first two to try it out.
}

Neither of the routes from m config are registering. What am I doing wrong here?

A: 

Never mind. All I had to do was remove the "config" tags and it seems to be working now.

Jeremy Hicks