PHP Classes

File: views/frontend/block/category-item.php

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

Contents

Class file image Download
<?php

use yii\helpers\Html;

?>

<div class="card mb-4">
    <?php if($model->image): ?>
<?= Html::a(Html::img(Yii::$app->thumbnailer->get($model->image, 640, 480), ['class' => 'img-fluid']), $model->url) ?>
<?php endif; ?>
<div class="card-body">
        <h3 class="card-title"><?= Html::a(Html::encode($model->title), $model->url) ?></h3>
        <p class="card-text"><?= Html::encode($model->abstract) ?></p>
    </div>
</div>

<?php if (($index + 1) % 3 == 0): ?>
<div class="w-100"></div>
<?php endif; ?>