From 17c1d504c919ad522dbcd315a7f207f6aec3a413 Mon Sep 17 00:00:00 2001 From: Thomas Leduec Date: Wed, 10 Jan 2018 14:52:33 +0100 Subject: [PATCH] IM-42: Behebe Template Fehler bei Inhaltsreferenzen ohne Teaser Text --- degov_node_blog/templates/node--blog--slideshow.html.twig | 2 +- degov_node_blog/templates/node--blog--teaser.html.twig | 2 +- degov_node_event/templates/node--event--slideshow.html.twig | 2 +- degov_node_event/templates/node--event--teaser.html.twig | 2 +- .../templates/node--normal_page--slideshow.html.twig | 2 +- .../templates/node--normal_page--teaser.html.twig | 2 +- degov_node_press/templates/node--press--slideshow.html.twig | 2 +- degov_node_press/templates/node--press--teaser.html.twig | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/degov_node_blog/templates/node--blog--slideshow.html.twig b/degov_node_blog/templates/node--blog--slideshow.html.twig index 34b9e70d..c88dffd3 100644 --- a/degov_node_blog/templates/node--blog--slideshow.html.twig +++ b/degov_node_blog/templates/node--blog--slideshow.html.twig @@ -105,7 +105,7 @@ {% endif %} - {% if content.field_teaser_text %} + {% if content.field_teaser_text.0 %} {% set text = content.field_teaser_text|render|striptags %}

{{ text|length > 600 ? text|slice(0, 600) ~ '...' : text }}

diff --git a/degov_node_blog/templates/node--blog--teaser.html.twig b/degov_node_blog/templates/node--blog--teaser.html.twig index 9d3ee9dd..efc96799 100644 --- a/degov_node_blog/templates/node--blog--teaser.html.twig +++ b/degov_node_blog/templates/node--blog--teaser.html.twig @@ -105,7 +105,7 @@ {% endif %} - {% if content.field_teaser_text %} + {% if content.field_teaser_text.0 %}
{% autoescape false %} {{ node.field_teaser_text.value|length > 440 ? node.field_teaser_text.value|striptags|slice(0, 440) ~ '...' : node.field_teaser_text.value|striptags }} diff --git a/degov_node_event/templates/node--event--slideshow.html.twig b/degov_node_event/templates/node--event--slideshow.html.twig index c8c503b5..9a8f6acd 100644 --- a/degov_node_event/templates/node--event--slideshow.html.twig +++ b/degov_node_event/templates/node--event--slideshow.html.twig @@ -114,7 +114,7 @@ {% endif %} - {% if content.field_teaser_text %} + {% if content.field_teaser_text.0 %} {% set text = content.field_teaser_text|render|striptags %}

{{ text|length > 600 ? text|slice(0, 600) ~ '...' : text }}

diff --git a/degov_node_event/templates/node--event--teaser.html.twig b/degov_node_event/templates/node--event--teaser.html.twig index 8c4ec957..f7318a62 100644 --- a/degov_node_event/templates/node--event--teaser.html.twig +++ b/degov_node_event/templates/node--event--teaser.html.twig @@ -131,7 +131,7 @@
{% endif %} - {% if content.field_teaser_text %} + {% if content.field_teaser_text.0 %}
{% autoescape false %} diff --git a/degov_node_normal_page/templates/node--normal_page--slideshow.html.twig b/degov_node_normal_page/templates/node--normal_page--slideshow.html.twig index d159c21d..51ae5ede 100644 --- a/degov_node_normal_page/templates/node--normal_page--slideshow.html.twig +++ b/degov_node_normal_page/templates/node--normal_page--slideshow.html.twig @@ -106,7 +106,7 @@ {% endif %} - {% if content.field_teaser_text %} + {% if content.field_teaser_text.0 %} {% set text = content.field_teaser_text|render|striptags %}

{{ text|length > 600 ? text|slice(0, 600) ~ '...' : text }}

diff --git a/degov_node_normal_page/templates/node--normal_page--teaser.html.twig b/degov_node_normal_page/templates/node--normal_page--teaser.html.twig index 3ad84f2b..745023e8 100644 --- a/degov_node_normal_page/templates/node--normal_page--teaser.html.twig +++ b/degov_node_normal_page/templates/node--normal_page--teaser.html.twig @@ -107,7 +107,7 @@ {% endif %} - {% if content.field_teaser_text %} + {% if content.field_teaser_text.0 %}
{% autoescape false %} {{ node.field_teaser_text.value|length > 440 ? node.field_teaser_text.value|striptags|slice(0, 440) ~ '...' : node.field_teaser_text.value|striptags }} diff --git a/degov_node_press/templates/node--press--slideshow.html.twig b/degov_node_press/templates/node--press--slideshow.html.twig index 933abe22..43c8e331 100644 --- a/degov_node_press/templates/node--press--slideshow.html.twig +++ b/degov_node_press/templates/node--press--slideshow.html.twig @@ -105,7 +105,7 @@ {% endif %} - {% if content.field_teaser_text %} + {% if content.field_teaser_text.0 %} {% set text = content.field_teaser_text|render|striptags %}

{{ text|length > 600 ? text|slice(0, 600) ~ '...' : text }}

diff --git a/degov_node_press/templates/node--press--teaser.html.twig b/degov_node_press/templates/node--press--teaser.html.twig index 9ee839fb..1f8c7b48 100644 --- a/degov_node_press/templates/node--press--teaser.html.twig +++ b/degov_node_press/templates/node--press--teaser.html.twig @@ -124,7 +124,7 @@
{% endif %} - {% if content.field_teaser_text %} + {% if content.field_teaser_text.0 %}
{% autoescape false %}