Commit 5e37688e8a34aecf032c8505f42c87d04a11d386

Authored by Timur Kastemirov
1 parent 16c2f26d

seo for hardcoded pages

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