Commit 2229c4ebfcd439723249677956e85a9893ef6fb6
1 parent
2214ac40
- title description, h1 on book view
Showing
1 changed file
with
11 additions
and
2 deletions
Show diff stats
frontend/views/book/view.php
... | ... | @@ -4,6 +4,7 @@ |
4 | 4 | * @var \common\models\Book $model; |
5 | 5 | */ |
6 | 6 | use artbox\core\helpers\ImageHelper; |
7 | + use artbox\core\models\Alias; | |
7 | 8 | use yii\helpers\Url; |
8 | 9 | use yii\web\View; |
9 | 10 | |
... | ... | @@ -63,7 +64,15 @@ |
63 | 64 | JS; |
64 | 65 | |
65 | 66 | $this->registerJs($js, View::POS_READY); |
66 | - | |
67 | + /** | |
68 | + * @var \artbox\core\components\SeoComponent $seo; | |
69 | + */ | |
70 | + $seo = \Yii::$app->get('seo'); | |
71 | + $seo->forseLoaded(false); | |
72 | + $seo->setAlias(new Alias([ | |
73 | + 'title' => 'Книга \''.$model->title.'\' - Автор: '.$model->author->name.' '.$model->author->secondname, | |
74 | + 'description' => $model->preview | |
75 | + ])) | |
67 | 76 | ?> |
68 | 77 | |
69 | 78 | <section class="section-card"> |
... | ... | @@ -80,7 +89,7 @@ $this->registerJs($js, View::POS_READY); |
80 | 89 | <?php } ?> |
81 | 90 | </div> |
82 | 91 | <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4"> |
83 | - <div class="style card-title"><?=$model->title?></div> | |
92 | + <h1 class="style card-title"><?=$model->title?></h1> | |
84 | 93 | |
85 | 94 | <div class="style card-autor-wrapp"> |
86 | 95 | <?php if (!empty($model->author->avatar)){?> | ... | ... |