31 lines
1.2 KiB
PHP
31 lines
1.2 KiB
PHP
<?php
|
|
global $tp;
|
|
|
|
$engagements_list = get_field('engagements_list', 'option');
|
|
if(empty($disabled)) {
|
|
$disabled = NULL;
|
|
}
|
|
?>
|
|
|
|
|
|
<?php if(!empty($engagements_list)) : ?>
|
|
<div class="engagements-list">
|
|
<?php $count = 1; ?>
|
|
<?php foreach($engagements_list as $l) : ?>
|
|
<div class="engagements-list__item <?php if($disabled == $count) : ?> disabled <?php endif; ?>">
|
|
<?php if(!empty($l['image'])) : ?>
|
|
<div class="engagements-list__item-image"><img src="<?php echo $l['image']; ?>" alt="<?php echo (!empty($l['button']['title']) ? $l['button']['title'] : 'engagement'); ?>" /></div>
|
|
<?php endif; ?>
|
|
|
|
<?php if(!empty($l['text'])) : ?>
|
|
<div class="engagements-list__item-text"><?php echo $l['text']; ?></div>
|
|
<?php endif; ?>
|
|
|
|
<?php if(!empty($l['button']['url'])) : ?>
|
|
<a class="engagements-list__item-btn btn" title="Voir la page" href="<?php echo $l['button']['url']; ?>">Voir la page <i class="btn__icon btn__icon_arrow-right"></i></a>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php $count++; ?>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<?php endif; ?>
|