/** * Manages all models. */ public function actionAdmin($parent_id = 1) { $model = new Cms('search'); $model->unsetAttributes(); // clear any default values $model->parent_id = $parent_id; if (isset($_GET['Cms'])) { $model->attributes = $_GET['Cms']; } $page = Cms::model()->find('id=:id', array(':id' => $parent_id)); $this->render('admin', array('model' => $model, 'page' => $page)); }