Model And View problem..

If I am in the view, and I want to retrieve information from a model which differs from the regular model that uses that the view. How do i do that?

The Model-View-Controller architecture is designed to keep the classes in each organizational sphere independent of each other (low coupling). So there is no “regular model” that uses the view. You can pass any model you want into the view. You can handle the implementing and passing of a model in the Controller’s action methods. For example,




  public function actionIndex() {

	//get the Active Record

	$model = ARClass::model()->find('id=1');

	//pass the model to the index view

	$this->render('index',array('model'=>$model));

	//now you can access the model in the view as $model

  }



If you want to learn more read the Yii documentation. It is excellent!