Commit 8ccb4b63c198bc16de89f7bc8b86625e3e0e60a3
1 parent
9645ead8
big commti
Showing
1 changed file
with
12 additions
and
1 deletions
Show diff stats
frontend/views/text/index.php
1 | 1 | <?php |
2 | +use common\models\Page; | |
3 | +use frontend\widgets\Seo; | |
2 | 4 | use yii\widgets\Breadcrumbs; |
5 | + | |
6 | +/** | |
7 | + * @var $text Page | |
8 | + */ | |
3 | 9 | ?> |
4 | 10 | <?php |
5 | 11 | $this->title = $text->meta_title; |
12 | +$this->params[ 'seo' ][ Seo::H1] = !empty($category->h1) ?$text->h1: $text->title ; | |
13 | +$this->params[ 'seo' ][ Seo::TITLE] = !empty($text->meta_title)? $text->meta_title : $text->title; | |
14 | +$this->params[ 'seo' ][ Seo::DESCRIPTION] = !empty($text->meta_description)? $text->meta_description : ''; | |
15 | +$this->params[ 'seo' ][ Seo::SEO_TEXT] =!empty($text->seo_text)? $text->seo_text : ''; | |
16 | + | |
6 | 17 | $this->registerMetaTag(['name' => 'description', 'content' => $text->meta_description]); |
7 | 18 | $this->registerMetaTag(['name' => 'keywords', 'content' => $text->meta_keywords]); |
8 | 19 | ?> |
... | ... | @@ -10,7 +21,7 @@ $this->registerMetaTag(['name' => 'keywords', 'content' => $text->meta_keywords] |
10 | 21 | <div class="container"> |
11 | 22 | |
12 | 23 | <div class="content"> |
13 | -<h1><?=$text->title;?></h1> | |
24 | +<h1><?= Seo::widget(['row'=> Seo::H1])?></h1> | |
14 | 25 | <?=$text->body;?> |
15 | 26 | </div> |
16 | 27 | </div> |
17 | 28 | \ No newline at end of file | ... | ... |