Commit 51464eb66c1f00251b50b0f0849fc60569d1f73e

Authored by Eugeny Galkovskiy
1 parent 1a0c1fe7

123

backend/views/articles/index.php
@@ -10,9 +10,9 @@ use yii\grid\GridView; @@ -10,9 +10,9 @@ use yii\grid\GridView;
10 $this->title = 'Articles'; 10 $this->title = 'Articles';
11 $this->params['breadcrumbs'][] = $this->title; 11 $this->params['breadcrumbs'][] = $this->title;
12 ?> 12 ?>
13 -<div class="articles-index"> 13 +<div class="articles-index" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
14 14
15 - <h1><?= Html::encode($this->title) ?></h1> 15 + <h1 itemprop="title"><?= Html::encode($this->title) ?></h1>
16 <?php // echo $this->render('_search', ['model' => $searchModel]); ?> 16 <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
17 17
18 <p> 18 <p>
backend/views/articles/view.php
@@ -10,9 +10,9 @@ $this-&gt;title = $model-&gt;title; @@ -10,9 +10,9 @@ $this-&gt;title = $model-&gt;title;
10 $this->params['breadcrumbs'][] = ['label' => 'Articles', 'url' => ['index']]; 10 $this->params['breadcrumbs'][] = ['label' => 'Articles', 'url' => ['index']];
11 $this->params['breadcrumbs'][] = $this->title; 11 $this->params['breadcrumbs'][] = $this->title;
12 ?> 12 ?>
13 -<div class="articles-view"> 13 +<div class="articles-view" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
14 14
15 - <h1><?= Html::encode($this->title) ?></h1> 15 + <h1 itemprop="title"><?= Html::encode($this->title) ?></h1>
16 16
17 <p> 17 <p>
18 <?= Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> 18 <?= Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
frontend/views/articles/show.php
@@ -4,7 +4,9 @@ use yii\helpers\Url; @@ -4,7 +4,9 @@ use yii\helpers\Url;
4 use yii\widgets\Breadcrumbs; 4 use yii\widgets\Breadcrumbs;
5 ?> 5 ?>
6 <?php 6 <?php
  7 +
7 $this->title = $news->meta_title; 8 $this->title = $news->meta_title;
  9 +$this->params['seo']['title'] = !empty($this->title) ?$this->title : '';
8 $this->registerMetaTag(['name' => 'description', 'content' => $news->meta_description]); 10 $this->registerMetaTag(['name' => 'description', 'content' => $news->meta_description]);
9 ?> 11 ?>
10 12