How to modificate the view YII

Hi, i wanna ask about the view in YII. How could i change or modificate the view, where the view isn’t a default view of YII? because i want to show the information (with SQL) from the virtual table, but it still keep the YII’s default function…? thanks before…

Hi,

Please give more details on what you want to implement, as it’s unclear now.

You can collect your data in /controllers/YourController, and then call any view you want to and pass this data like this:


public function actionYourFunction(){

 $data = YourModel::model()->findAll();

 $this->render('your_view_file', array('data'=>$data));

}



And then to handle $data anyway you need to in view. Use html/elementar php, if needed, as usual

For example,


foreach($data as $row){

echo $row->name;

}