2008年12月18日星期四

[fw-mvc] Another routing question

I'm a ZF noob and I'm having trouble with routes, using the config method:

relevant config.ini
routes.Admin_Reportbuilder_Report.route =
"admin/reportbuilder/report/:obj_id"
routes.Admin_Reportbuilder_Report.defaults.module = admin
routes.Admin_Reportbuilder_Report.defaults.controller = reportbuilder
routes.Admin_Reportbuilder_Report.defaults.action = report

relevant bootstrap.php
$router = $front->getRouter();
$router->addConfig($config, 'routes');

base url is "zapp" (subdir)

Issue:

1. in URL http://ssr/zapp/admin/reportbuilder/report/1NW9vZEg (this route
works, as 1NW9VZEg is the :obj_id)
2. this: <?php echo $this->url(array('action'=>'copy')); ?>
3. outputs: /zapp/admin/reportbuilder/report/1NW9vZEg
4. expected (hoped?): /zapp/admin/reportbuilder/copy
5. brain: fried

Thanks,
Hans
--
View this message in context: http://www.nabble.com/Another-routing-question-tp21081352p21081352.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: