@php $cards = []; $ctaLabels = []; foreach($block->cards as $card) { $cardFields = $card->getCardFields(); if ($cardFields) { $cards[] = $cardFields; } $ctaLabels[] = [$card->cta_label, $card->cta2_label]; } @endphp @if(!empty($cards))
@if ($block->anchor_id )
@endif
@if(!empty($block->block_title)) @php $block->heading_type = 'h2'; @endphp @include('frontend.templates.blocks.title-block',[ 'isInclude' => true, ]) @endif
@foreach ($cards as $i => $card)
@if ($card->image && empty($block->no_image))
{!! getMediaImg($card->image, '600x445', htmlentities($card->title)) !!}
@endif
@if ($card->subject) {{ $card->subject }} @endif @if (empty($block->no_image))

@title($card->title)

@else

@title($card->title)

@endif
{!! !empty($card->is_card) ? $card->content : $card->excerpt !!}
@if ($card->cta) {!! generateLink($card->cta, 'std-button std-button--small', null, null, false, $ctaLabels[$i][0]) !!} @endif @if ($card->cta2) {!! generateLink($card->cta2, 'link-animation-arrow link-left-arrow', null, null, false, $ctaLabels[$i][1]) !!} @endif
@if ($loop->index === 2) @break @endif @endforeach
@endif