<?php
/**
 * @var $this \yii\web\View
 * @var $gallery \app\models\front\Gallery
 */

use yii\helpers\Html;

?>
<div class="gallery-wrapper" id="gallery-<?=$gallery->id?>">
    <div class="gallery splide">
        <div class="splide__track">
            <ul class="splide__list">
                <?php
                foreach($gallery->getBehavior('galleryBehavior')->getImages() as $image):?>
                <li class="splide__slide">
                    <img src="<?=$image->getUrl('medium')?>" alt="">
                </li>
                <?php endforeach;?>
            </ul>
        </div>
        
    </div>
</div>
