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