[eluser]CroNiX[/eluser]
I think even more intuitive would be /cars/honda/civic
You could even do /cars/honda/civic/2012 to include the model year
If you only want one controller, instead of having to have a "cars" controller, you'd just
Code:
$route['cars/(:any)/(:any)'] = 'brand/view/$1/$2';
$route['cars/(:any)'] = 'brand/view/$1/';
$route['cars'] = 'brand/view';
And the brand controller would look something like
Code:
class Brand extends CI_Controller {
public function view($make = '', $model = '')
{
if ( ! empty($make))
{
//They entered a car Make
}
if ( ! empty($model))
{
//They entered a car Model
}
}
}
This would allow for urls like:
/cars (list all car makes)
/cars/honda (list all hondas)
/cars/honda/civic (list all honda civics)
There are many ways to do this, but hopefully this gives you an idea.