Zend router config xml, shortcut? -
i have xml this
<configdata> <routes> <home type="zend_controller_router_route"> <route>home</route> <defaults> <controller>index</controller> <action>index</action> </defaults> </home> </routes> </configdata>
now works i'd give each rout shortcut add in bootstrap this..
$router->addroute('shortcut_key',$route);
how can in config xml?
on bootsrap.php...
protected function _initroutes() { $routefile = new zend_config_xml(application_path.'/routes.xml'); $router = zend_controller_front::getinstance()->getrouter(); $router->addconfig($routefile); return $router; }
where routes.xml file xml file containing routes , must inside application folder
Comments
Post a Comment