From b3b71af21cbb0d2fad919f51601ed96494226d99 Mon Sep 17 00:00:00 2001 From: bach Date: Fri, 28 Jun 2024 11:53:55 +0200 Subject: [PATCH 1/3] caption on home --- web/themes/custom/reha/reha.theme | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/themes/custom/reha/reha.theme b/web/themes/custom/reha/reha.theme index 24a2838..3e30b3c 100644 --- a/web/themes/custom/reha/reha.theme +++ b/web/themes/custom/reha/reha.theme @@ -136,4 +136,9 @@ function reha_preprocess_field(&$variables){ } } } + if($variables['field_name'] === 'field_image'){ + if($variables['element']['#view_mode'] === 'home_block'){ + array_splice($variables['items'], 1); + } + } } \ No newline at end of file From c9fd10742183a14cac311951a799cb24866fdb5d Mon Sep 17 00:00:00 2001 From: bach Date: Fri, 28 Jun 2024 11:53:55 +0200 Subject: [PATCH 2/3] caption on home --- web/themes/custom/reha/reha.theme | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/themes/custom/reha/reha.theme b/web/themes/custom/reha/reha.theme index 24a2838..3e30b3c 100644 --- a/web/themes/custom/reha/reha.theme +++ b/web/themes/custom/reha/reha.theme @@ -136,4 +136,9 @@ function reha_preprocess_field(&$variables){ } } } + if($variables['field_name'] === 'field_image'){ + if($variables['element']['#view_mode'] === 'home_block'){ + array_splice($variables['items'], 1); + } + } } \ No newline at end of file From 36162a6e2d70f2af8d3e512cfee3ba01278dc402 Mon Sep 17 00:00:00 2001 From: bach Date: Fri, 28 Jun 2024 11:56:12 +0200 Subject: [PATCH 3/3] caption on home --- .../sync/core.entity_view_display.node.site.home_block.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/config/sync/core.entity_view_display.node.site.home_block.yml b/config/sync/core.entity_view_display.node.site.home_block.yml index e264038..7dc161e 100644 --- a/config/sync/core.entity_view_display.node.site.home_block.yml +++ b/config/sync/core.entity_view_display.node.site.home_block.yml @@ -18,7 +18,7 @@ dependencies: - node.type.site module: - address - - image_delta_formatter + - image_field_caption - user id: node.site.home_block targetEntityType: node @@ -41,15 +41,13 @@ content: weight: 3 region: content field_image: - type: image_delta_formatter + type: image_caption label: visually_hidden settings: - deltas: '0' image_style: wide image_link: content image_loading: attribute: lazy - deltas_reversed: 0 third_party_settings: { } weight: 0 region: content