My site lets you create projects, and there are multiple project types (like project templates).
What I want to do is to have one single action that handles all project types. Currently for each project type I have a separate action and view. I want to route them all to one single action.
Here's what I've come up with so far, that doesn't work.
resources.router.routes.new_project.route = "/project/new-:id"
resources.router.routes.new_project.defaults.controller = "project"
resources.router.routes.new_project.defaults.module = "site"
resources.router.routes.new_project.defaults.action = "new"
resources.router.routes.new_project.reqs.id = "([0-9]+)"
So I want my URLs to look like http://mysite.com/project/new-1
or http://mysite.com/project/new-2
, where 1 and 2 are the project type IDs. Both these URLs should be mapped to the action called new
in the project
controller.
Is something like this possible in ZF 1.11?