single table inheritance switch views

I am implementing STI as in

the wiki page talks about cars, so I will do so.

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":


        	case "family":


        	case "tatata":



I think this is very stupid.

anybody have any better approach.

okay you can mock me if you think you need to :)

How about:

$cars = Car::model()->findAll();

foreach( $cars as $car )


  $this->render( $car->type . '-view', array( $car ) );