2010年7月10日星期六

[fw-mvc] Problem with custom route

Hi.

I define a named route through my application.ini:

resources.router.routes.userprofile.route = "/user/profile/:id/:name/*"
resources.router.routes.userprofile.defaults.controller = "profile"
resources.router.routes.userprofile.defaults.action = "index"
resources.router.routes.userprofile.defaults.module = "user"

When I try to access the following url: /user/profile/1/foobar/

I get an exception: Zend_Controller_Router_Exception: id is not specified

I have no idea where the problem is. Any advice?

- Marcus

没有评论: