Controller within another Controller

Is it possible to instantiate a Controller class within another controller class

For example I have controller Student and and method actionShow of class student I have the following




public function actionShow()

	{  

		

		$student = $this->loadStudent();

		

		$studentContact = new Student_ContactController;

		

		//Checking if there was an ajax request

		if(Yii::app()->request->isAjaxRequest){

			$this->renderPartial('show',array(

				'student'=>$student,

	

			));

		}else{

			$this->render('show',array(

				'student'=>$student,

			));

		}

		

		

		

	}

Is it possible to include this action in the method $studentContact = new Student_ContactController;

Getting errors, :frowning:

it doesnt make sense

all data you want to render in a view you have to load from a model

second option is to use widgets within a view, pulling data from a model again

Thx, I managed, accessed the data from the model