Routes: how to get mycontroller/id function same as mycontroller/action/id |
[eluser]dreamynsx[/eluser]
Well the real idea for all this is that my index action will show a list of cars, and can accept a category Lets say I have 20 categories. I wouldn't want to create 20 different methods just to support this. So back to the function index($cat="") { ... } www.site.com/cars/index/sports <-- works (shows 'sport' cars) www.site.com/cars <-- works (just show default list) www.site.com/cars/sports <-- fails ... |
Welcome Guest, Not a member yet? Register Sign In |