fix cover image
All checks were successful
Deploy / Deploy to Production (push) Successful in 7s

This commit is contained in:
isUnknown 2026-01-08 15:25:55 +01:00
parent 6c8cdf21d2
commit 84aa4cac17
4 changed files with 3 additions and 4 deletions

View file

@ -1,4 +1,4 @@
Sort: 2
Sort: 1
----

View file

@ -1,4 +1,4 @@
Sort: 1
Sort: 2
----

View file

@ -9,7 +9,7 @@
<?php foreach($site->children()->listed() as $product): ?>
<article class="store__product">
<figure>
<?php if($cover = $product->files()->sort()->first()): ?>
<?php if($cover = $product->files()->sortBy('sort', 'asc')->first()): ?>
<?php snippet('picture', [
'file' => $cover,
'alt' => $product->title()->html(),

View file

@ -81,7 +81,6 @@
<div class="product-gallery swiper">
<div class="swiper-wrapper">
<?php
// Afficher uniquement les vraies images du produit
if ($page->hasFiles()):
foreach($page->files()->sortBy('sort', 'asc') as $image):
?>