Commit 51464eb66c1f00251b50b0f0849fc60569d1f73e

Authored by Eugeny Galkovskiy
1 parent 1a0c1fe7

123

backend/views/articles/index.php
... ... @@ -10,9 +10,9 @@ use yii\grid\GridView;
10 10 $this->title = 'Articles';
11 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 16 <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
17 17  
18 18 <p>
... ...
backend/views/articles/view.php
... ... @@ -10,9 +10,9 @@ $this-&gt;title = $model-&gt;title;
10 10 $this->params['breadcrumbs'][] = ['label' => 'Articles', 'url' => ['index']];
11 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 17 <p>
18 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 4 use yii\widgets\Breadcrumbs;
5 5 ?>
6 6 <?php
  7 +
7 8 $this->title = $news->meta_title;
  9 +$this->params['seo']['title'] = !empty($this->title) ?$this->title : '';
8 10 $this->registerMetaTag(['name' => 'description', 'content' => $news->meta_description]);
9 11 ?>
10 12  
... ...