|
|
|
<?php
|
|
|
|
|
|
|
|
use core\entities\post\PostCategory;
|
|
|
|
use core\entities\post\PostType;
|
|
|
|
use yii\helpers\Html;
|
|
|
|
|
|
|
|
/* @var $this yii\web\View */
|
|
|
|
/* @var $dataProvider yii\data\DataProviderInterface */
|
|
|
|
/* @var $category PostCategory */
|
|
|
|
/* @var $type PostType */
|
|
|
|
|
|
|
|
$this->title = $category->getSeoTitle();
|
|
|
|
|
|
|
|
$this->registerMetaTag(['name' =>'description', 'content' => $category->meta->description]);
|
|
|
|
$this->registerMetaTag(['name' =>'keywords', 'content' => $category->meta->keywords]);
|
|
|
|
|
|
|
|
$this->params['breadcrumbs'][] = ['label' => $type->plural, 'url' => ['post/index', 'tid' => $type->id]];
|
|
|
|
$this->params['breadcrumbs'][] = $category->name;
|
|
|
|
|
|
|
|
$this->params['active_category'] = $category;
|
|
|
|
?>
|
|
|
|
|
|
|
|
<h1><?= Html::encode($category->getHeadingTile()) ?></h1>
|
|
|
|
|
|
|
|
<?php if (trim($category->description)): ?>
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-body">
|
|
|
|
<?= Yii::$app->formatter->asHtml($category->description, [
|
|
|
|
'Attr.AllowedRel' => array('nofollow'),
|
|
|
|
'HTML.SafeObject' => true,
|
|
|
|
'Output.FlashCompat' => true,
|
|
|
|
'HTML.SafeIframe' => true,
|
|
|
|
'URI.SafeIframeRegexp'=>'%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/)%',
|
|
|
|
]) ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<?= $this->render('_list', [
|
|
|
|
'dataProvider' => $dataProvider
|
|
|
|
]) ?>
|
|
|
|
|
|
|
|
|