diff --git a/backend/controllers/SlideController.php b/backend/controllers/SlideController.php index e959ac5..f316873 100644 --- a/backend/controllers/SlideController.php +++ b/backend/controllers/SlideController.php @@ -142,18 +142,6 @@ ] ) ->one(); - $langs = call_user_func( - [ - $page, - 'getVariationModels', - ] - ); - foreach ($langs as $lang) { - if ($lang->alias !== null) { - $lang->alias->delete(); - } - } - return $page->delete(); } diff --git a/common/messages/ru/app.php b/common/messages/ru/app.php index c4d2b3f..0fe223f 100644 --- a/common/messages/ru/app.php +++ b/common/messages/ru/app.php @@ -13,5 +13,7 @@ return [ 'Contact us!' => 'Свяжитесь с нами', 'Go to contact page' => 'Перейти на страницу контактов', 'Send message' => 'Отправить сообщение', - 'Contact form' => "Форма для связи" + 'Contact form' => "Форма для связи", + 'News' => 'Новости', + 'Media' => 'Медиа(фотогалерея)' ]; \ No newline at end of file diff --git a/common/messages/ua/app.php b/common/messages/ua/app.php index d789275..76fb58d 100644 --- a/common/messages/ua/app.php +++ b/common/messages/ua/app.php @@ -14,5 +14,7 @@ return [ 'Go to contact page' => 'Перейти до сторінки контактів', 'Читать далее' => 'Читати далі', "Send message" => 'Надіслати повідомлення', - "Contact form" => 'Форма для зв\'язку' + "Contact form" => 'Форма для зв\'язку', + 'News' => 'Новини', + 'Media' => 'Медіа(фотогалерея)' ]; \ No newline at end of file diff --git a/frontend/components/UrlManager.php b/frontend/components/UrlManager.php index 3c5da8a..063a6c2 100644 --- a/frontend/components/UrlManager.php +++ b/frontend/components/UrlManager.php @@ -135,6 +135,7 @@ $split = explode('/', $request->pathInfo); if (in_array($split[ 0 ], array_keys($this->languages->getActive()))) { if ($this->hideDefaultLanguagePrefix && ( $split[ 0 ] == $this->languages->getDefault()->url )) { + unset($split[ 0 ]); \Yii::$app->response->redirect('/' . implode('/', $split), 301) diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index 120885f..e18a952 100755 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -283,6 +283,26 @@ _________________________________________________________ --> 'label' => \Yii::t('app', 'Home'), 'url' => [ 'site/index' ], ]; + $items[] = [ + 'label' => \Yii::t('app', 'News'), + 'url' => [ 'blog/index' ], + ]; + $items[] = [ + 'label' => \Yii::t('app', 'About'), + 'url' => [ 'site/about' ], + ]; + $items[] = [ + 'label' => \Yii::t('app', 'Events'), + 'url' => [ 'event/index' ], + ]; + $items[] = [ + 'label' => \Yii::t('app', 'Media'), + 'url' => [ 'gallery/index' ], + ]; + $items[] = [ + 'label' => \Yii::t('app', 'Contacts'), + 'url' => [ 'site/contact' ], + ]; foreach ($pageCategories as $category) { if (empty($category->pages)) { @@ -300,22 +320,10 @@ _________________________________________________________ --> 'items' => $pages, ]; } - $items[] = [ - 'label' => \Yii::t('app', 'Contacts'), - 'url' => [ 'site/contact' ], - ]; - $items[] = [ - 'label' => \Yii::t('app', 'About'), - 'url' => [ 'site/about' ], - ]; - $items[] = [ - 'label' => \Yii::t('app', 'Blog'), - 'url' => [ 'blog/index' ], - ]; - $items[] = [ - 'label' => \Yii::t('app', 'Events'), - 'url' => [ 'event/index' ], - ]; + + + + echo Nav::widget( [ 'items' => $items, -- libgit2 0.21.4