On Thu, Jan 26, 2012 at 12:10 AM, MattRock <[email protected]> wrote: > This may be a silly question, but I am curious about passing arguments in > the URL. I have a controller called "controller." I pass an argument to the > controller in the URL by pasing the URL as "/controller?argument". I would > like to pass the argument Pyramid style as "/controller/argument." > > Is this possible to do with TG2? Can this be done and still have additional > defined actions in the BaseController [I.E. /controller/action]? >
Each argument found after the first found exposed method is treated as an argument to the method itself. So you can write /controller/arg1v/arg2v/arg3v instead of /controller?arg1=arg1v&arg2=arg2v&arg3=arg3v the two are equivalent. Just pay attention to the index method. When called as /index/1/2/3 everything works, but to achieve /1/2/3 you will need to use _default instead of index. -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

