PHP Classes

File: views/frontend/page/list.php

Recommend this page to a friend!
  Classes of Gabriel Alejandro López López   Yii2 Website Module   views/frontend/page/list.php   Download  
File: views/frontend/page/list.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Yii2 Website Module
Add a content page management system to a site
Author: By
Last change:
Date: 2 months ago
Size: 1,026 bytes
 

Contents

Class file image Download
<?php

use yii\helpers\Html;
use
daxslab\website\widgets\PageWidgetizer;

$this->title = $model->title;
$this->description = $model->abstract;
$this->image = $model->image;

?>

<article id="<?= $model->slug ?>" class="<?= $model->type->name ?>">
    <?= $this->render('_header', ['model' => $model]) ?>
<div class="container">

        <?= \yii\bootstrap4\Breadcrumbs::widget([
           
'links' => \daxslab\website\components\Lookup::getBreadcrumbsForPage($model, true),
        ])
?>

        <?php if ($model->body): ?>
<?= PageWidgetizer::widget([
               
'body' => $model->body
           
]) ?>
<?php endif; ?>

        <?php if ($dataProvider->query->exists()): ?>
<?= \yii\widgets\ListView::widget([
               
'layout' => '{items}{pager}',
               
'dataProvider' => $dataProvider,
               
'itemView' => "_{$model->type->name}-view",
               
'itemOptions' => ['tag' => false],
            ])
?>
<?php endif; ?>

    </div>
</article>