fix 🐛 remove alt and title display for picture and banner on product show when thay are not present
This commit is contained in:
parent
fbe796bf64
commit
d45e1a45d2
1 changed files with 10 additions and 9 deletions
|
|
@ -78,13 +78,13 @@
|
|||
</div>
|
||||
{{-- LABELS TITLE --}}
|
||||
@if ($productModel->labels->where('published', true))
|
||||
<div class="col-12 col-sm-4 col-lg-12 col-xxl-4 d-flex justify-content-start align-items-center mb-2 flex-wrap"
|
||||
id="product-header-details-labels">
|
||||
@foreach ($productModel->labels->where('published', true) as $label)
|
||||
<img class="img-fluid pb-2 pe-3" src="{{ asset($label->picture) }}"
|
||||
title="{{ $label->picture_title }}" alt="{{ $label->picture_alt }}">
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="col-12 col-sm-4 col-lg-12 col-xxl-4 d-flex justify-content-start align-items-center mb-2 flex-wrap"
|
||||
id="product-header-details-labels">
|
||||
@foreach ($productModel->labels->where('published', true) as $label)
|
||||
<img class="img-fluid pb-2 pe-3" src="{{ asset($label->picture) }}"
|
||||
title="{{ $label->picture ?? $label->picture_title }}" alt="{{ $label->picture ?? $label->picture_alt }}">
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
{{-- RANGE --}}
|
||||
<div class="col-12">
|
||||
|
|
@ -348,8 +348,8 @@
|
|||
])
|
||||
<img class="line-border-large w-100"
|
||||
src="{{ asset($productModel->banner ? $productModel->banner : ($productModel->range ? $productModel->range->banner_ambiance : $productModel->subrange->range->banner_ambiance)) }}"
|
||||
title="{{ $productModel->banner_title ? $productModel->banner_title : ($productModel->range ? $productModel->range->banner_ambiance_title : $productModel->subrange->range->banner_ambiance_title) }}"
|
||||
alt="{{ $productModel->banner_alt ? $productModel->banner_alt : ($productModel->range ? $productModel->range->banner_ambiance_alt : $productModel->subrange->range->banner_ambiance_alt) }}">
|
||||
title="{{ $productModel->banner ? $productModel->banner_title : ($productModel->range ? $productModel->range->banner_ambiance_title : $productModel->subrange->range->banner_ambiance_title) }}"
|
||||
alt="{{ $productModel->banner ? $productModel->banner_alt : ($productModel->range ? $productModel->range->banner_ambiance_alt : $productModel->subrange->range->banner_ambiance_alt) }}">
|
||||
</div>
|
||||
</section>
|
||||
{{-- PRODUCT ANIMATION --}}
|
||||
|
|
@ -462,6 +462,7 @@
|
|||
]),
|
||||
'btnRouteTitle' => 'nos produits',
|
||||
'bgReverse' => true,
|
||||
'btnText' => 'voir tous les produits'
|
||||
])
|
||||
@endif
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue