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.

42 lines
1.4 KiB

7 years ago
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $page \common\modules\pages\entities\Page */
7 years ago
$this->title = $page->getSeoTitle();
$this->registerMetaTag(['name' => 'description', 'content' => $page->meta->description]);
$this->registerMetaTag(['name' => 'keywords', 'content' => $page->meta->keywords]);
foreach ($page->parents as $parent) {
if (!$parent->isRoot()) {
$this->params['breadcrumbs'][] = ['label' => $parent->title, 'url' => ['view', 'id' => $parent->id]];
}
}
$this->params['breadcrumbs'][] = $page->title;
?>
<article class="page-view">
<h1><?= Html::encode($page->title) ?></h1>
6 years ago
<!--
< ?= preg_replace('/[?= (*.) ?]/m', '', Yii::$app->formatter->asHtml($page->content, [
7 years ago
'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/)%',
6 years ago
])) ?> -->
<?= preg_replace_callback('/\[\?= (.*) \?\]/gm', function ($m) {
return $m[1];
}, Yii::$app->formatter->asHtml($page->content, [
'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/)%',
])) ?>
7 years ago
</article>