PHP Classes

File: views/frontend/page/_page-view.php

Recommend this page to a friend!
  Classes of Gabriel Alejandro López López   Yii2 Website Module   views/frontend/page/_page-view.php   Download  
File: views/frontend/page/_page-view.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: 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">
        <h2 class="card-title"><?= Html::a(Html::encode($model->title), $model->url) ?></h2>
        <p class="card-text"><?= Html::encode($model->abstract) ?></p>
    </div>
</div>

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