Commit cc865d874efd81263970a5aa534266d36fced7c9
1 parent
8596ef4b
-Seo component ready, testing
Showing
1 changed file
with
7 additions
and
1 deletions
Show diff stats
frontend/views/layouts/main.php
@@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
3 | /* @var $this \yii\web\View */ | 3 | /* @var $this \yii\web\View */ |
4 | /* @var $content string */ | 4 | /* @var $content string */ |
5 | 5 | ||
6 | + use artbox\core\components\SeoComponent; | ||
6 | use artbox\core\models\Settings; | 7 | use artbox\core\models\Settings; |
7 | use artbox\core\models\User; | 8 | use artbox\core\models\User; |
8 | use yii\helpers\Html; | 9 | use yii\helpers\Html; |
@@ -17,6 +18,11 @@ | @@ -17,6 +18,11 @@ | ||
17 | * @var User $user | 18 | * @var User $user |
18 | */ | 19 | */ |
19 | $user = \Yii::$app->user->identity; | 20 | $user = \Yii::$app->user->identity; |
21 | + | ||
22 | + /** | ||
23 | + * @var SeoComponent $seo | ||
24 | + */ | ||
25 | + $seo = Yii::$app->get('seo'); | ||
20 | ?> | 26 | ?> |
21 | <?php $this->beginPage() ?> | 27 | <?php $this->beginPage() ?> |
22 | <!DOCTYPE html> | 28 | <!DOCTYPE html> |
@@ -25,7 +31,7 @@ | @@ -25,7 +31,7 @@ | ||
25 | <meta charset="<?= Yii::$app->charset ?>"> | 31 | <meta charset="<?= Yii::$app->charset ?>"> |
26 | <meta name="viewport" content="width=device-width, initial-scale=1"> | 32 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
27 | <?= Html::csrfMetaTags() ?> | 33 | <?= Html::csrfMetaTags() ?> |
28 | - <title><?= Html::encode($this->title) ?></title> | 34 | + <title><?= Html::encode($seo->title) ?></title> |
29 | <?php $this->head() ?> | 35 | <?php $this->head() ?> |
30 | </head> | 36 | </head> |
31 | <body> | 37 | <body> |