From 5e37688e8a34aecf032c8505f42c87d04a11d386 Mon Sep 17 00:00:00 2001 From: timur Date: Tue, 20 Feb 2018 14:22:18 +0200 Subject: [PATCH] seo for hardcoded pages --- frontend/views/blog/index.php | 4 +++- frontend/views/object/index.php | 4 +++- frontend/views/site/contact.php | 3 ++- frontend/views/site/individual.php | 3 ++- frontend/views/site/legal.php | 3 ++- frontend/views/site/media-about.php | 3 ++- 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/frontend/views/blog/index.php b/frontend/views/blog/index.php index 112dcd1..da3aabe 100644 --- a/frontend/views/blog/index.php +++ b/frontend/views/blog/index.php @@ -6,6 +6,7 @@ * * @var View $this * @var ActiveDataProvider $dataProvider + * @var \artbox\core\components\SeoComponent $seo */ use yii\web\View; @@ -18,6 +19,7 @@ use yii\helpers\Url; $settings = Settings::getInstance(); + $seo = \Yii::$app->get('seo'); switch (Yii::$app->controller->action->id){ @@ -31,7 +33,7 @@ $this->params['h1'] = \Yii::t('app', 'Blog Tag'); break; default: - $this->params['h1'] = \Yii::t('app', 'menu-blog'); + $this->params['h1'] = $seo->h1; break; } diff --git a/frontend/views/object/index.php b/frontend/views/object/index.php index bf5b07b..6f8498a 100644 --- a/frontend/views/object/index.php +++ b/frontend/views/object/index.php @@ -4,6 +4,7 @@ * @var View $this * @var Feedback $contact * @var Objectkb[] $objects + * @var \artbox\core\components\SeoComponent $seo */ use artbox\core\models\Feedback; @@ -16,8 +17,9 @@ use yii\helpers\Url; $settings = Settings::getInstance(); + $seo = \Yii::$app->get('seo'); - $this->params['h1'] = \Yii::t('app', 'menu-objects'); + $this->params['h1'] = $seo->h1; $this->params[ 'breadcrumbs' ][] = $this->params['h1']; ?> diff --git a/frontend/views/site/contact.php b/frontend/views/site/contact.php index d20230c..6b448ba 100644 --- a/frontend/views/site/contact.php +++ b/frontend/views/site/contact.php @@ -14,8 +14,9 @@ MapAsset::register($this); $settings = Settings::getInstance(); + $seo = \Yii::$app->get('seo'); - $this->params['h1'] = \Yii::t('app', 'menu-contacts'); + $this->params['h1'] = $seo->h1; $this->params[ 'breadcrumbs' ][] = $this->params['h1']; $js = <<< JS diff --git a/frontend/views/site/individual.php b/frontend/views/site/individual.php index b8f7ea7..4ab9c4f 100644 --- a/frontend/views/site/individual.php +++ b/frontend/views/site/individual.php @@ -17,8 +17,9 @@ use common\models\Objectkb; $settings = Settings::getInstance(); + $seo = \Yii::$app->get('seo'); - $this->params['h1'] = \Yii::t('app', 'menu-individual'); + $this->params['h1'] = $seo->h1; $this->params[ 'breadcrumbs' ][] = $this->params['h1']; ?>
diff --git a/frontend/views/site/legal.php b/frontend/views/site/legal.php index a9f6649..8471f5d 100644 --- a/frontend/views/site/legal.php +++ b/frontend/views/site/legal.php @@ -14,8 +14,9 @@ use yii\web\View; MapAsset::register($this); $settings = Settings::getInstance(); +$seo = \Yii::$app->get('seo'); -$this->params['h1'] = ""; +$this->params['h1'] = $seo->h1; $this->params[ 'breadcrumbs' ][] = \Yii::t('app', 'menu-legal'); $js = <<< JS diff --git a/frontend/views/site/media-about.php b/frontend/views/site/media-about.php index e3d82be..3386f4a 100644 --- a/frontend/views/site/media-about.php +++ b/frontend/views/site/media-about.php @@ -13,8 +13,9 @@ use yii\bootstrap\ActiveForm; use yii\web\View; $settings = Settings::getInstance(); + $seo = \Yii::$app->get('seo'); - $this->params['h1'] = \Yii::t('app', 'menu-mediaabout'); + $this->params['h1'] = $seo->h1; $this->params[ 'breadcrumbs' ][] = $this->params['h1']; ?> -- libgit2 0.21.4