I want to list cars from all types. each type has its own view file.
currently I use switch to decide the correct view file.
$Cars = Car::model()->findAll();
foreach($Cars as $car)
{
switch ($car->type){
case "sport":
$this->render('sport-view',array($car));
case "family":
$this->render('family-view',array($car));
case "tatata":
$this->render('tatata-view',array($car));
}