public function actionIndex() { $model = new Faq(); $model->unsetAttributes(); $model->attributes = $this->aRequest('Faq'); $this->render('index', array('model' => $model)); }
/** * Manages all models. */ public function actionAdmin() { $model = new Faq('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Faq'])) { $model->attributes = $_GET['Faq']; } $this->render('admin', array('model' => $model)); }
public function actionIndex() { $categoryId = $this->iGet('category_id', 1); $model = new Faq(); $model->unsetAttributes(); $model->category_id = $categoryId; $model->status = Faq::STATUS_SHOW; $categories = FaqCategory::getCategoryMenu(); $this->title = Yii::t('common', 'Frequently Asked Questions'); $this->pageTitle = array($this->title); if ($model->category) { $this->pageTitle = array($this->title, $model->category->getAttributeValue('name')); } $this->breadcrumbs = array('FAQ'); $this->render('index', array('model' => $model, 'categories' => $categories)); }