Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
 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();
 }