← back to Dw Material Reclassify
Material template: skip image-less products in the grid
b25bea3f2dabd4792e91a7b5364d22694f1e3ed4 · 2026-07-22 12:23:39 -0700 · Steve
Files touched
M collection.material.liquid
Diff
commit b25bea3f2dabd4792e91a7b5364d22694f1e3ed4
Author: Steve <steve@designerwallcoverings.com>
Date: Wed Jul 22 12:23:39 2026 -0700
Material template: skip image-less products in the grid
---
collection.material.liquid | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/collection.material.liquid b/collection.material.liquid
index f21d8eb..960137e 100644
--- a/collection.material.liquid
+++ b/collection.material.liquid
@@ -49,13 +49,14 @@
</aside>
<div class="dw-mat-grid">
{% for product in collection.products %}
+ {%- if product.featured_image == blank -%}{%- continue -%}{%- endif -%}
{%- assign sellsku = '' -%}
{%- for v in product.variants -%}
{%- if v.title != 'Sample' and sellsku == '' -%}{%- assign sellsku = v.sku -%}{%- endif -%}
{%- endfor -%}
{%- if sellsku == '' and product.variants.first -%}{%- assign sellsku = product.variants.first.sku -%}{%- endif -%}
<a class="dw-mat-card" href="{{ product.url }}">
- {% if product.featured_image %}<img src="{{ product.featured_image | image_url: width: 420 }}" alt="{{ product.title | escape }}" loading="lazy" width="420" height="420">{% endif %}
+ <img src="{{ product.featured_image | image_url: width: 420 }}" alt="{{ product.title | escape }}" loading="lazy" width="420" height="420">
<div class="dw-mat-cap">{{ product.title | split: '|' | first | split: ',' | first | strip }}
{% if sellsku != '' %}<span class="dw-mat-sku">{{ sellsku }}</span>{% endif %}
</div>
← 8770d2a Material LIVE: native (non-Boost) collection template render
·
back to Dw Material Reclassify
·
FIX infinite-scroll regression: scope card-hover observer to 20b2848 →