PHP Classes

File: views/frontend/block/category.php

Recommend this page to a friend!
  Classes of Gabriel Alejandro López López   Yii2 Website Module   views/frontend/block/category.php   Download  
File: views/frontend/block/category.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: 1 month ago
Size: 734 bytes
 

Contents

Class file image Download
<?php
use yii\helpers\Html;

?>

<section class="<?= "block block-{$view}"?>">
    <header>
        <div class="container">
            <h2><?= Html::encode($model->title) ?></h2>
            <p class="lead mt-4 pt-4 border-top"><?= Html::encode($model->abstract) ?></p>
        </div>
    </header>
    <div class="container">

        <?php if ($dataProvider->count): ?>
<?= \yii\widgets\ListView::widget([
               
'layout' => '{items}{pager}',
               
'dataProvider' => $dataProvider,
               
'options' => ['class' => 'card-deck'],
               
'itemView' => "category-item",
               
'itemOptions' => ['tag' => false],
            ])
?>
<?php endif; ?>

    </div>
</section>