35 lines
1.7 KiB
PHP
35 lines
1.7 KiB
PHP
@php
|
|
if(empty($disabled)) {
|
|
$disabled = NULL;
|
|
}
|
|
@endphp
|
|
|
|
@if(isset($pageNosEngagements) && $pageNosEngagements->childPages->count())
|
|
<div class="engagements-list">
|
|
@php $count = 1; @endphp
|
|
@foreach($pageNosEngagements->childPages as $childPage)
|
|
@php $route = \App\Helpers\RouteHelper::routeNameChecker("front.dynamic-pages.$childPage->id_key"); @endphp
|
|
@if(isset($childPage->content['list_identification']))
|
|
<div @class([
|
|
'engagements-list__item',
|
|
'disabled' => $route === url()->current() || $disabled == $count,
|
|
])>
|
|
@if(!empty($childPage->content['list_identification'][0]['image_icon']))
|
|
<div class="engagements-list__item-image">
|
|
<img src="{{ asset($childPage->content['list_identification'][0]['image_icon']) }}"
|
|
alt="{{ !empty($childPage->content['list_identification'][0]['string_label']) ? $childPage->content['list_identification'][0]['string_label'] : 'engagement' }}" />
|
|
</div>
|
|
@endif
|
|
@if(!empty($childPage['text']))
|
|
<div class="engagements-list__item-text">{{ $childPage['text'] }}</div>
|
|
@endif
|
|
<a class="engagements-list__item-btn btn" title="Voir la page" href="{{ $route }}">
|
|
{{ $childPage->content['list_identification'][0]['string_label'] }}
|
|
<i class="btn__icon btn__icon_arrow-right"></i>
|
|
</a>
|
|
</div>
|
|
@endif
|
|
@php $count++; @endphp
|
|
@endforeach
|
|
</div>
|
|
@endif
|