From 80429441740971273451bb7d6497bf3a521c19a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Mummert?= Date: Sun, 24 May 2026 16:40:11 +0200 Subject: [PATCH] Fix survey module headlines --- contao/templates/frontend/member_survey_edit.html.twig | 6 ++++-- contao/templates/frontend/member_survey_list.html.twig | 6 ++++-- contao/templates/frontend/show_survey.html.twig | 6 ++++-- contao/templates/frontend/show_survey_results.html.twig | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/contao/templates/frontend/member_survey_edit.html.twig b/contao/templates/frontend/member_survey_edit.html.twig index 349e4d4..abe93d0 100644 --- a/contao/templates/frontend/member_survey_edit.html.twig +++ b/contao/templates/frontend/member_survey_edit.html.twig @@ -1,10 +1,12 @@ {% include '@Survey/frontend/_survey_assets.html.twig' %} {% include '@Survey/frontend/_survey_branding.html.twig' %} +{% set moduleHeadline = headline is iterable ? headline.text|default('') : headline|default('') %} +
- {% if headline.text %} + {% if moduleHeadline %}
-

{{ headline.text }}

+

{{ moduleHeadline }}

{% endif %} diff --git a/contao/templates/frontend/member_survey_list.html.twig b/contao/templates/frontend/member_survey_list.html.twig index c1adc0e..f7a021c 100644 --- a/contao/templates/frontend/member_survey_list.html.twig +++ b/contao/templates/frontend/member_survey_list.html.twig @@ -1,10 +1,12 @@ {% include '@Survey/frontend/_survey_assets.html.twig' %} {% include '@Survey/frontend/_survey_branding.html.twig' %} +{% set moduleHeadline = headline is iterable ? headline.text|default('') : headline|default('') %} +
- {% if headline.text %} + {% if moduleHeadline %}
-

{{ headline.text }}

+

{{ moduleHeadline }}

{% endif %} diff --git a/contao/templates/frontend/show_survey.html.twig b/contao/templates/frontend/show_survey.html.twig index b17e7b7..638956a 100644 --- a/contao/templates/frontend/show_survey.html.twig +++ b/contao/templates/frontend/show_survey.html.twig @@ -1,9 +1,11 @@ {% include '@Survey/frontend/_survey_assets.html.twig' %} {% include '@Survey/frontend/_survey_branding.html.twig' %} +{% set moduleHeadline = headline is iterable ? headline.text|default('') : headline|default('') %} +
- {% if headline.text %} -

{{ headline.text }}

+ {% if moduleHeadline %} +

{{ moduleHeadline }}

{% endif %} {% if errorMessage %} diff --git a/contao/templates/frontend/show_survey_results.html.twig b/contao/templates/frontend/show_survey_results.html.twig index 85886d8..786c575 100644 --- a/contao/templates/frontend/show_survey_results.html.twig +++ b/contao/templates/frontend/show_survey_results.html.twig @@ -1,10 +1,12 @@ {% include '@Survey/frontend/_survey_assets.html.twig' %} {% include '@Survey/frontend/_survey_branding.html.twig' %} +{% set moduleHeadline = headline is iterable ? headline.text|default('') : headline|default('') %} +
- {% if headline.text %} + {% if moduleHeadline %}
-

{{ headline.text }}

+

{{ moduleHeadline }}

{% endif %}