public function actionCity() { $slug = Yii::app()->request->getParam("slug", ""); $city = CatalogCity::fetchBySlug($slug); Yii::app()->page->setTitle('Достопримечательности ' . $city->name2); $this->render("city", array("city" => $city)); }
public function actionCity() { if (!empty($_GET["slug"])) { $model = CatalogCity::fetchBySlug(trim($_GET["slug"])); if ($model->id > 0) { unset($_GET["slug"]); $_GET["city_id"] = $model->id; } } $this->actionIndex(); }