Commit 8ccb4b63c198bc16de89f7bc8b86625e3e0e60a3

Authored by Administrator
1 parent 9645ead8

big commti

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