Commit 5e37688e8a34aecf032c8505f42c87d04a11d386

Authored by Timur Kastemirov
1 parent 16c2f26d

seo for hardcoded pages

frontend/views/blog/index.php
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 * 6 *
7 * @var View $this 7 * @var View $this
8 * @var ActiveDataProvider $dataProvider 8 * @var ActiveDataProvider $dataProvider
  9 + * @var \artbox\core\components\SeoComponent $seo
9 */ 10 */
10 11
11 use yii\web\View; 12 use yii\web\View;
@@ -18,6 +19,7 @@ @@ -18,6 +19,7 @@
18 use yii\helpers\Url; 19 use yii\helpers\Url;
19 20
20 $settings = Settings::getInstance(); 21 $settings = Settings::getInstance();
  22 + $seo = \Yii::$app->get('seo');
21 23
22 switch (Yii::$app->controller->action->id){ 24 switch (Yii::$app->controller->action->id){
23 25
@@ -31,7 +33,7 @@ @@ -31,7 +33,7 @@
31 $this->params['h1'] = \Yii::t('app', 'Blog Tag'); 33 $this->params['h1'] = \Yii::t('app', 'Blog Tag');
32 break; 34 break;
33 default: 35 default:
34 - $this->params['h1'] = \Yii::t('app', 'menu-blog'); 36 + $this->params['h1'] = $seo->h1;
35 break; 37 break;
36 38
37 } 39 }
frontend/views/object/index.php
@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
4 * @var View $this 4 * @var View $this
5 * @var Feedback $contact 5 * @var Feedback $contact
6 * @var Objectkb[] $objects 6 * @var Objectkb[] $objects
  7 + * @var \artbox\core\components\SeoComponent $seo
7 */ 8 */
8 9
9 use artbox\core\models\Feedback; 10 use artbox\core\models\Feedback;
@@ -16,8 +17,9 @@ @@ -16,8 +17,9 @@
16 use yii\helpers\Url; 17 use yii\helpers\Url;
17 18
18 $settings = Settings::getInstance(); 19 $settings = Settings::getInstance();
  20 + $seo = \Yii::$app->get('seo');
19 21
20 - $this->params['h1'] = \Yii::t('app', 'menu-objects'); 22 + $this->params['h1'] = $seo->h1;
21 $this->params[ 'breadcrumbs' ][] = $this->params['h1']; 23 $this->params[ 'breadcrumbs' ][] = $this->params['h1'];
22 ?> 24 ?>
23 25
frontend/views/site/contact.php
@@ -14,8 +14,9 @@ @@ -14,8 +14,9 @@
14 14
15 MapAsset::register($this); 15 MapAsset::register($this);
16 $settings = Settings::getInstance(); 16 $settings = Settings::getInstance();
  17 + $seo = \Yii::$app->get('seo');
17 18
18 - $this->params['h1'] = \Yii::t('app', 'menu-contacts'); 19 + $this->params['h1'] = $seo->h1;
19 $this->params[ 'breadcrumbs' ][] = $this->params['h1']; 20 $this->params[ 'breadcrumbs' ][] = $this->params['h1'];
20 21
21 $js = <<< JS 22 $js = <<< JS
frontend/views/site/individual.php
@@ -17,8 +17,9 @@ @@ -17,8 +17,9 @@
17 use common\models\Objectkb; 17 use common\models\Objectkb;
18 18
19 $settings = Settings::getInstance(); 19 $settings = Settings::getInstance();
  20 + $seo = \Yii::$app->get('seo');
20 21
21 - $this->params['h1'] = \Yii::t('app', 'menu-individual'); 22 + $this->params['h1'] = $seo->h1;
22 $this->params[ 'breadcrumbs' ][] = $this->params['h1']; 23 $this->params[ 'breadcrumbs' ][] = $this->params['h1'];
23 ?> 24 ?>
24 <div id="individual-wr"> 25 <div id="individual-wr">
frontend/views/site/legal.php
@@ -14,8 +14,9 @@ use yii\web\View; @@ -14,8 +14,9 @@ use yii\web\View;
14 14
15 MapAsset::register($this); 15 MapAsset::register($this);
16 $settings = Settings::getInstance(); 16 $settings = Settings::getInstance();
  17 +$seo = \Yii::$app->get('seo');
17 18
18 -$this->params['h1'] = ""; 19 +$this->params['h1'] = $seo->h1;
19 $this->params[ 'breadcrumbs' ][] = \Yii::t('app', 'menu-legal'); 20 $this->params[ 'breadcrumbs' ][] = \Yii::t('app', 'menu-legal');
20 21
21 $js = <<< JS 22 $js = <<< JS
frontend/views/site/media-about.php
@@ -13,8 +13,9 @@ use yii\bootstrap\ActiveForm; @@ -13,8 +13,9 @@ use yii\bootstrap\ActiveForm;
13 use yii\web\View; 13 use yii\web\View;
14 14
15 $settings = Settings::getInstance(); 15 $settings = Settings::getInstance();
  16 + $seo = \Yii::$app->get('seo');
16 17
17 - $this->params['h1'] = \Yii::t('app', 'menu-mediaabout'); 18 + $this->params['h1'] = $seo->h1;
18 $this->params[ 'breadcrumbs' ][] = $this->params['h1']; 19 $this->params[ 'breadcrumbs' ][] = $this->params['h1'];
19 ?> 20 ?>
20 21