Esempio n. 1
0
<?php

/**
 * @var $this yii\web\View
 * @var $model string|\gromver\platform\common\models\Category
 */
?>

<h1 class="page-title title-category"><?php 
echo \yii\helpers\Html::encode($model->title);
?>
</h1>

<?php 
echo \gromver\platform\frontend\widgets\PostList::widget(['id' => 'cat-posts', 'category' => $model, 'layout' => 'post/listDefault']);
Esempio n. 2
0
<?php

/**
 * @var $this yii\web\View
 * @var $model string|\gromver\platform\common\models\Category
 */
?>

<h1 class="page-title title-category"><?php 
echo \yii\helpers\Html::encode($model->title);
?>
</h1>

<?php 
echo \gromver\platform\frontend\widgets\CategoryList::widget(['id' => 'cat-cats', 'category' => $model, 'listViewOptions' => ['emptyTextOptions' => ['class' => 'hidden']]]);
echo \gromver\platform\frontend\widgets\PostList::widget(['id' => 'cat-posts', 'category' => $model]);
Esempio n. 3
0
<?php

/**
 * @var $this yii\web\View
 */
use yii\helpers\Html;
/** @var \gromver\platform\common\models\MenuItem $menu */
$menu = Yii::$app->menuManager->getActiveMenu();
if ($menu) {
    $this->title = $menu->isProperContext() ? $menu->title : Yii::t('gromver.platform', 'News');
    $this->params['breadcrumbs'] = $menu->getBreadcrumbs($menu->isApplicableContext());
} else {
    $this->title = Yii::t('gromver.platform', 'News');
}
//$this->params['breadcrumbs'][] = $this->title;
echo Html::tag('h2', Html::encode($this->title));
echo \gromver\platform\frontend\widgets\PostList::widget(['id' => 'post-index', 'context' => Yii::$app->menuManager->activeMenu ? Yii::$app->menuManager->activeMenu->path : null]);