From 6117d3440b08b2dcd7687899fb6c8c003b756c10 Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 17 Jun 2025 11:01:32 +0200 Subject: [PATCH] renders images in hero widget only if attachment exist for live preview --- modules/theme/views/hero-widget.html | 55 +++++++++++++++------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/modules/theme/views/hero-widget.html b/modules/theme/views/hero-widget.html index ae39b42..8349094 100644 --- a/modules/theme/views/hero-widget.html +++ b/modules/theme/views/hero-widget.html @@ -34,18 +34,20 @@
{# applies image crop and focal point if exist #} - {{ attachment._alt }} + {% if attachment %} + {{ attachment._alt }} + {% endif %} {# Content container #}
@@ -109,20 +111,21 @@ {%- set h2Mt = ' prose-headings:mt-4' if widget.caption else '' -%}
- - {{ attachment._alt }} + {% if attachment %} + {{ attachment._alt }} + {% endif %} {# Content container #}