diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index cae0a39..f66584a 100644 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -78,39 +78,6 @@ class SiteController extends Controller */ public function actionIndex() { - // парсим URL, находим контроллер и подключаем view-файл - if (($url = substr(yii::$app->request->url, 1)) == '') - { - $url = '/'; - } - - // находим страницу - if ($page = Page::getPageByUrl ($url)) - { - // проверяем или не закрыта и есть все файлы - if (Page::isShow ($page) - && $page['template_file'] != NULL - && is_file (yii::$app->viewPath.'/'.$page['template_file'].'.php')) - { - // загружаем роуты -/* - yii::$app->UrlManager->rules += [ - 'maгаз' => 'shop/categoty', - ]; -*/ - - list ($controller, $view) = explode ('/', $page['template_file']); - - // подключаем - return Yii::$app->runAction($page['template_file'], [ - 'controller_name' => $controller, - 'view' => $view, - 'page_id' => $page['page_id'], - 'template_file' => $page['template_file'], - ]); - } - } - return $this->render('index'); } -- libgit2 0.21.4