Commit e06590841be1c98d4a30e5c3072e431f65ea3770
1 parent
c9ec322b
- title h1 in services, packages
Showing
3 changed files
with
8 additions
and
5 deletions
Show diff stats
frontend/views/layouts/main.php
@@ -65,6 +65,7 @@ | @@ -65,6 +65,7 @@ | ||
65 | <!DOCTYPE html> | 65 | <!DOCTYPE html> |
66 | <html xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"> | 66 | <html xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"> |
67 | <head> | 67 | <head> |
68 | + <title><?=$seo->title?></title> | ||
68 | <meta charset="utf-8"> | 69 | <meta charset="utf-8"> |
69 | <meta name="viewport" content="width=device-width"> | 70 | <meta name="viewport" content="width=device-width"> |
70 | <link type="image/x-icon" href="favicon.ico" rel="icon"> | 71 | <link type="image/x-icon" href="favicon.ico" rel="icon"> |
frontend/views/package/view.php
@@ -4,10 +4,10 @@ | @@ -4,10 +4,10 @@ | ||
4 | * @var \yii\web\View $this; | 4 | * @var \yii\web\View $this; |
5 | */ | 5 | */ |
6 | use common\models\Package; | 6 | use common\models\Package; |
7 | - | 7 | + $seo = \Yii::$app->get('seo'); |
8 | $this->params[ 'entity'] = Package::className(); | 8 | $this->params[ 'entity'] = Package::className(); |
9 | $this->params['entity_id'] = $package->id; | 9 | $this->params['entity_id'] = $package->id; |
10 | - $this->params['breadcrumbs'][] = $package->title; | 10 | + $this->params['breadcrumbs'][] = (!empty($seo->h1)) ? $seo->h1 :$package->title; |
11 | ?> | 11 | ?> |
12 | 12 | ||
13 | 13 | ||
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | <div class="col-xs-12 col-sm-12"> | 17 | <div class="col-xs-12 col-sm-12"> |
18 | <div class="row"> | 18 | <div class="row"> |
19 | <div class="col-xs-12"> | 19 | <div class="col-xs-12"> |
20 | - <h1 class="title-pages"><?=$package->title?></h1> | 20 | + <h1 class="title-pages"><?=(!empty($seo->h1)) ? $seo->h1 :$package->title;?></h1> |
21 | </div> | 21 | </div> |
22 | </div> | 22 | </div> |
23 | <div class="row"> | 23 | <div class="row"> |
frontend/views/service/view.php
@@ -5,15 +5,17 @@ | @@ -5,15 +5,17 @@ | ||
5 | * @var \artbox\core\forms\Module $moduleComment; | 5 | * @var \artbox\core\forms\Module $moduleComment; |
6 | * @var \artbox\core\forms\Module $moduleQuestion; | 6 | * @var \artbox\core\forms\Module $moduleQuestion; |
7 | * @var \yii\web\View $this | 7 | * @var \yii\web\View $this |
8 | + * @var \artbox\core\components\SeoComponent $seo; | ||
8 | */ | 9 | */ |
9 | use artbox\core\helpers\Url; | 10 | use artbox\core\helpers\Url; |
10 | use common\models\Service; | 11 | use common\models\Service; |
11 | 12 | ||
13 | + $seo = \Yii::$app->get('seo'); | ||
12 | $this->params['entity'] = Service::className(); | 14 | $this->params['entity'] = Service::className(); |
13 | $this->params['entity_id'] = $model->id; | 15 | $this->params['entity_id'] = $model->id; |
14 | 16 | ||
15 | $moduleComment = \Yii::$app->getModule('comments'); | 17 | $moduleComment = \Yii::$app->getModule('comments'); |
16 | - $this->params[ 'breadcrumbs' ][] = $model->title; | 18 | + $this->params[ 'breadcrumbs' ][] = (!empty($seo->h1)) ? $seo->h1 :$model->title; |
17 | 19 | ||
18 | $moduleComment->inputOptions += ['service_id' => [ | 20 | $moduleComment->inputOptions += ['service_id' => [ |
19 | 'type' => 'hiddenInput', | 21 | 'type' => 'hiddenInput', |
@@ -49,7 +51,7 @@ | @@ -49,7 +51,7 @@ | ||
49 | <div class="col-xs-12 col-sm-8 col-md-8 col-lg-9"> | 51 | <div class="col-xs-12 col-sm-8 col-md-8 col-lg-9"> |
50 | <div class="row"> | 52 | <div class="row"> |
51 | <div class="col-xs-12"> | 53 | <div class="col-xs-12"> |
52 | - <h1 class="title-pages"><?=$model->title?></h1> | 54 | + <h1 class="title-pages"><?=(!empty($seo->h1)) ? $seo->h1 :$model->title?></h1> |
53 | </div> | 55 | </div> |
54 | </div> | 56 | </div> |
55 | <div class="row"> | 57 | <div class="row"> |