/** * Displays a particular model. * @param integer $id the ID of the model to be displayed */ public function actionView($id) { if ($this->loadModel($id)->deleted == 1) { throw new CHttpException(403, 'The page you are requested are invalid'); } if (@$_GET['asModal'] == true) { $model = Tasklog::model()->findByPk($id); $this->renderPartial('_view', array('model' => $model), false, true); //echo $model->id; } }