public function actionIndex() { $model = FAI_ABOUT::model()->find(array('select' => 'title, description, meta_key, meta_desc', 'condition' => 'status=:status AND onmpage=:onmpage', 'params' => array(':status' => 1, ':onmpage' => 1))); $this->pageTitle = Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'About Project') . ' / ' . $this->getFConfig('serverName'); $this->pageH1 = $model->title; $this->breadcrumbs = array(Yii::t('' . Yii::app()->request->cookies['language']->value . '', 'About Project'), $model->title); Yii::app()->clientScript->registerMetaTag($model->meta_desc, 'description'); Yii::app()->clientScript->registerMetaTag($model->meta_key, 'keywords'); $this->render('index', array('model' => $model)); }
public function loadModel($id) { $model = FAI_ABOUT::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }