diff --git a/frontend/controllers/BlogController.php b/frontend/controllers/BlogController.php index 76fbee6..1cf648e 100755 --- a/frontend/controllers/BlogController.php +++ b/frontend/controllers/BlogController.php @@ -33,6 +33,15 @@ ], ] ); + + $aliasIdsForBlog = [89, 90, 91]; + $this->view->params['aliases'] = \artbox\core\models\Alias::find() + ->where( + [ + 'id' => $aliasIdsForBlog + ] + ) + ->all(); $this->view->params[ 'breadcrumbs' ][] = \Yii::t('app', 'Блог'); @@ -151,6 +160,8 @@ throw new NotFoundHttpException(); } + $this->view->params['model'] = $article; + return $this->render( 'article', [ diff --git a/frontend/controllers/PageController.php b/frontend/controllers/PageController.php index 0809897..4fc3e0a 100755 --- a/frontend/controllers/PageController.php +++ b/frontend/controllers/PageController.php @@ -53,6 +53,8 @@ ] ) ->all(); + + $this->view->params['model'] = $model; if ($model->id == 6) { return $this->render( diff --git a/frontend/controllers/PersoneController.php b/frontend/controllers/PersoneController.php index 2a79b4b..c297d0c 100644 --- a/frontend/controllers/PersoneController.php +++ b/frontend/controllers/PersoneController.php @@ -22,6 +22,15 @@ ->with('lang.alias') ->all(); + $aliasIdsForBlog = [98, 99, 100]; + $this->view->params['aliases'] = \artbox\core\models\Alias::find() + ->where( + [ + 'id' => $aliasIdsForBlog + ] + ) + ->all(); + return $this->render( 'index', [ @@ -39,6 +48,8 @@ { $model = $this->findModel($id); + $this->view->params['model'] = $model; + return $this->render( 'view', [ diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index 07c0b08..c9f3e8f 100755 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -63,6 +63,16 @@ public function actionContact() { $contact = new Feedback(['scenario'=>Feedback::SCENARIO_WRITE_US]); + + $aliasIdsForBlog = [95, 96, 97]; + $this->view->params['aliases'] = \artbox\core\models\Alias::find() + ->where( + [ + 'id' => $aliasIdsForBlog + ] + ) + ->all(); + return $this->render( 'contact', [ @@ -199,6 +209,15 @@ ->with('lang') ->where([ 'id' => 4 ]) ->one(); + + $aliasIdsForBlog = [92, 93, 94]; + $this->view->params['aliases'] = \artbox\core\models\Alias::find() + ->where( + [ + 'id' => $aliasIdsForBlog + ] + ) + ->all(); return $this->render( 'price', @@ -216,6 +235,15 @@ 'id' => 1, ] ); + + $aliasIdsForBlog = [101, 102, 103]; + $this->view->params['aliases'] = \artbox\core\models\Alias::find() + ->where( + [ + 'id' => $aliasIdsForBlog + ] + ) + ->all(); return $this->render( 'comments', @@ -228,6 +256,15 @@ public function actionGallery() { $images = ( new Gallery() )->getImages(); + + $aliasIdsForBlog = [86, 87, 88]; + $this->view->params['aliases'] = \artbox\core\models\Alias::find() + ->where( + [ + 'id' => $aliasIdsForBlog + ] + ) + ->all(); return $this->render( 'gallery', diff --git a/frontend/views/blog/article.php b/frontend/views/blog/article.php index 3e9970d..941c7a9 100755 --- a/frontend/views/blog/article.php +++ b/frontend/views/blog/article.php @@ -17,7 +17,7 @@ ]; $this->params[ 'breadcrumbs' ][] = $model->lang->title; - + ?>
diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index d51f01e..4b4d6ed 100755 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -81,6 +81,7 @@ $("#feedback-phone, #appointment-phone").mask("+38(999)999-99-99"); JS; $this->registerJs($js, View::POS_READY); + ?> beginPage() ?> @@ -95,7 +96,25 @@ JS; <?= Html::encode($seo->title) ?> head() ?> - + params['model'])){ + echo \frontend\widgets\LanguageMarkupWidget::widget( + [ + 'languages' => ['ru', 'ua'], + 'model' => $this->params['model'] + ] + ); + } + else if( isset($this->params['aliases']) ) { + echo \frontend\widgets\LanguageMarkupWidget::widget( + [ + 'languages' => ['ru', 'ua'], + 'aliases' => $this->params['aliases'] + ] + ); + } + ?> +