On Jul 19, 2007, at 2:52 PM, SamDonaldson wrote:
But now, for the following url string, I want the following standard url string:www.blah.com/<controller>?params1=1¶ms2=2.... For the above standard url string, I want the controller to be the wildcard that takes a controller name and then I want the action to be something that's constant like 'run'. Basically, I don't want the design where I keep adding more actions into a controller. I want my controller to inherit the base controller class and call run 'run' method to take care of the request. I currently have: map.connect(':controller/*', controller=':controller', action='run') As you can see, I"m trying to make my route point to the controller that was passed in and then hardcode the action to 'run' which each controller file will define. How can I acheive this wildcarding etc.. in routes?
With the wildcard option: http://routes.groovie.org/manual.html#route-path Just have: map.connect(':controller/*url', action='run', url=None)Your run action will always be called, doesn't need a url on the end (take away the default if you want it), and it'll match anything after the controller name.
Cheers, Ben
smime.p7s
Description: S/MIME cryptographic signature
