From c5d9df5c42b5d2522e2a06b5f40422c1bbf497ab Mon Sep 17 00:00:00 2001 From: polo Date: Sat, 6 Sep 2025 00:33:22 +0200 Subject: =?UTF-8?q?correction=20bug=20au=20nombre=20de=20colonne=20lors=20?= =?UTF-8?q?du=20changement=20de=20la=20pr=C3=A9sentation=20d'un=20bloc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/NewsBlockBuilder.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/view/NewsBlockBuilder.php') diff --git a/src/view/NewsBlockBuilder.php b/src/view/NewsBlockBuilder.php index 4716c63..76e42c5 100644 --- a/src/view/NewsBlockBuilder.php +++ b/src/view/NewsBlockBuilder.php @@ -23,9 +23,10 @@ class NewsBlockBuilder extends AbstractBuilder // stratégie d'affichage du contenu (utilisation de méthodes ou de classe List, GridPresentation, etc) $section_class = $node->getNodeData()->getPresentation()->getName(); // = list, grid , mosaic ou carousel + $cols_min_width = ''; if($section_class === 'grid'){ - $min_width = (string)$node->getNodeData()->getColsMinWidth(); - $cols_min_width = 'grid-template-columns: repeat(auto-fit, minmax(' . $min_width . 'px, 1fr));'; + $min_width = $node->getNodeData()->getColsMinWidth(); + $cols_min_width = 'grid-template-columns: repeat(auto-fit, minmax(' . (string)$min_width . 'px, 1fr));'; } // ajouter un article -- cgit v1.2.3