<?php 
 
$per_row = Field::get('items_per_row', 3); 
 
?> 

<div class="<?php Layout::classes('content-grid-content'); ?>">
    <?php if (Field::exists('items')) : ?> 
        <div class="items <?php echo 'items-' . $per_row; ?>"> 
            <?php foreach (Field::iterable('items') as $loop) : ?> 
                <a class="item" href="<?php Layout::partial('link'); ?>"<?php Field::displayIfEquals('btn_target', '_blank', ' target="%s"'); ?>> 
                    <div class="item-image">
                        <div class="image" style="background-image: url(<?php echo Field::src('image', 'grid'); ?> ); ?>"></div>
                        <?php Field::html('description', '<span class="description">%s</span>'); ?>
                    </div>
                    <?php Field::html('label', '<div class="label">%s</div>'); ?> 
                </a> 
            <?php endforeach; ?> 
        </div> 
    <?php endif; ?>
</div> 