You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.3 KiB

7 years ago
<?php
3 years ago
use core\entities\post\PostCategory;
use core\entities\post\PostType;
use yii\helpers\Html;
7 years ago
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\DataProviderInterface */
3 years ago
/* @var $category PostCategory */
/* @var $type PostType */
7 years ago
$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
]) ?>