From e6a8f03e213fb5cb318428ffe556264f27962389 Mon Sep 17 00:00:00 2001 From: Tyler Alsbury <60230011+tyleralsbury@users.noreply.github.com> Date: Tue, 9 Jan 2024 16:14:00 -0500 Subject: [PATCH] Adjusted Featured Collection placeholders to work with any number of desktop columns (#3182) * Adjusted featured collection placeholders to work with any number of desktop columns --- sections/featured-collection.liquid | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sections/featured-collection.liquid b/sections/featured-collection.liquid index 15049af18d1..047f025e3e3 100644 --- a/sections/featured-collection.liquid +++ b/sections/featured-collection.liquid @@ -98,7 +98,7 @@ %} {%- else -%} - {%- for i in (1..4) -%} + {%- for i in (1..section.settings.columns_desktop) -%}
  • - {%- assign placeholder_image = 'product-apparel-' | append: forloop.rindex -%} + {% liquid + assign ridx = forloop.rindex + if ridx == 5 + assign ridx = 1 + endif + %} + {%- assign placeholder_image = 'product-apparel-' | append: ridx -%} {% render 'card-product', show_vendor: section.settings.show_vendor, media_aspect_ratio: section.settings.image_ratio,