From 72b7520466274e04f76ec165ae6b96a7c151ee3a Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 10 Apr 2024 12:15:13 +0200 Subject: [PATCH] 1152: Fixed rendering of headers --- CHANGELOG.md | 3 +++ .../hoeringsportal/templates/components/header.html.twig | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89f70f99..7bbfc414 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +* [PR-392](https://github.com/itk-dev/hoeringsportal/pull/392) + 1152: Fixed rendering of headers + ## [4.2.1] - 2024-04-04 * [pr-390](https://github.com/itk-dev/hoeringsportal/pull/390) diff --git a/web/themes/custom/hoeringsportal/templates/components/header.html.twig b/web/themes/custom/hoeringsportal/templates/components/header.html.twig index a079eef5..e63e36f8 100644 --- a/web/themes/custom/hoeringsportal/templates/components/header.html.twig +++ b/web/themes/custom/hoeringsportal/templates/components/header.html.twig @@ -4,7 +4,13 @@
-

{{ header|without('dynamic_block_field:node-hearing_warning') }}

+

+ {% if header['dynamic_block_field:node-hearing_warning'] is defined %} + {{ header|without('dynamic_block_field:node-hearing_warning') }} + {% else %} + {{ header }} + {% endif %} +

{% if teaser %} {{ teaser }} {% endif %}