render('index'); } public function actionPerson($person){ $model = Person::findOne(['alias'=>$person]); if( ( !$model instanceof Person ) || $model->show == 'N' ){ throw new NotFoundHttpException("Статья не найдена"); } return $this->render("person",["model"=>$model]); } }