Welcome Guest, Not a member yet? Register   Sign In
Routes: how to get mycontroller/id function same as mycontroller/action/id
#5

[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 ...


Messages In This Thread
Routes: how to get mycontroller/id function same as mycontroller/action/id - by El Forum - 10-19-2007, 01:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB