diff --git a/agaric/templates/field/field--field-body-paragraph--rss-teaser.html.twig b/agaric/templates/field/field--field-body-paragraph--rss-teaser.html.twig index 149d68d..2d79b0f 100644 --- a/agaric/templates/field/field--field-body-paragraph--rss-teaser.html.twig +++ b/agaric/templates/field/field--field-body-paragraph--rss-teaser.html.twig @@ -39,8 +39,8 @@ #} {% set one_and_done = false %} -{% for item in items if not one_and_done %} - {% if item.content['#paragraph'].type.0.entity.id == 'text' %} +{% for item in items %} + {% if item.content['#paragraph'].type.0.entity.id == 'text' and not one_and_done %} {% set one_and_done = true %} {{ item.content|render|escape }} {% endif %} diff --git a/agaric/templates/layout/node--case-study--full.html.twig b/agaric/templates/layout/node--case-study--full.html.twig index d6e5747..9c99d7c 100644 --- a/agaric/templates/layout/node--case-study--full.html.twig +++ b/agaric/templates/layout/node--case-study--full.html.twig @@ -74,8 +74,8 @@ {% set title_paragraph_index = null %} {% set has_title_paragraph = false %} {% if content.field_body_paragraph %} - {% for i, paragraph in content.field_body_paragraph if i|first != '#' %} - {% if content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %} + {% for i, paragraph in content.field_body_paragraph %} + {% if i|first != '#' and content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %} {% set has_title_paragraph = true %} {% set title_paragraph_index = i %} {{ paragraph }} @@ -103,8 +103,8 @@
{% if content.field_body_paragraph %} - {% for i, paragraph in content.field_body_paragraph if i|first != '#' %} - {% if i is not same as(title_paragraph_index) %} + {% for i, paragraph in content.field_body_paragraph %} + {% if i|first != '#' and i is not same as(title_paragraph_index) %} {{ paragraph }} {% endif %} {% endfor %} diff --git a/agaric/templates/layout/node--case-study--teaser.html.twig b/agaric/templates/layout/node--case-study--teaser.html.twig index a9375fd..3359fc1 100644 --- a/agaric/templates/layout/node--case-study--teaser.html.twig +++ b/agaric/templates/layout/node--case-study--teaser.html.twig @@ -6,8 +6,8 @@ {% set has_title_paragraph = false %} {% if content.field_body_paragraph %} - {% for i, paragraph in content.field_body_paragraph if i|first != '#' %} - {% if content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %} + {% for i, paragraph in content.field_body_paragraph %} + {% if i|first != '#' and content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %} {% set has_title_paragraph = true %} {{ paragraph }} {% endif %} diff --git a/agaric/templates/layout/node--full.html.twig b/agaric/templates/layout/node--full.html.twig index efed28d..3d07914 100644 --- a/agaric/templates/layout/node--full.html.twig +++ b/agaric/templates/layout/node--full.html.twig @@ -76,8 +76,8 @@ {% set title_paragraph_index = null %} {% set has_title_paragraph = false %} {% if content.field_body_paragraph %} - {% for i, paragraph in content.field_body_paragraph if i|first != '#' %} - {% if content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %} + {% for i, paragraph in content.field_body_paragraph %} + {% if i|first != '#' and content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %} {% set has_title_paragraph = true %} {% set title_paragraph_index = i %} {{ paragraph }} @@ -123,8 +123,8 @@ {% set walls_up = false %} {% if content.field_body_paragraph %} - {% for i, paragraph in content.field_body_paragraph if i|first != '#' %} - {% if i is not same as(title_paragraph_index) %} + {% for i, paragraph in content.field_body_paragraph %} + {% if i|first != '#' and i is not same as(title_paragraph_index) %} {% if paragraph['#paragraph'].field_style_escape_flow.value is not empty %} {% set bust_out = paragraph['#paragraph'].field_style_escape_flow.value %} {% endif %} diff --git a/agaric/templates/layout/node--people--full.html.twig b/agaric/templates/layout/node--people--full.html.twig index 360a06c..fd56534 100644 --- a/agaric/templates/layout/node--people--full.html.twig +++ b/agaric/templates/layout/node--people--full.html.twig @@ -74,8 +74,8 @@ {% set title_paragraph_index = null %} {% set has_title_paragraph = false %} {% if content.field_body_paragraph %} - {% for i, paragraph in content.field_body_paragraph if i|first != '#' %} - {% if content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %} + {% for i, paragraph in content.field_body_paragraph %} + {% if i|first != '#' and content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %} {% set has_title_paragraph = true %} {% set title_paragraph_index = i %} {{ paragraph }} @@ -109,8 +109,8 @@ {% set walls_up = false %} {% if content.field_body_paragraph %} - {% for i, paragraph in content.field_body_paragraph if i|first != '#' %} - {% if i is not same as(title_paragraph_index) %} + {% for i, paragraph in content.field_body_paragraph %} + {% if i|first != '#' and i is not same as(title_paragraph_index) %} {% if paragraph['#paragraph'].field_style_escape_flow.value is not empty %} {% set bust_out = paragraph['#paragraph'].field_style_escape_flow.value %} {% endif %} diff --git a/agaric/templates/layout/node--rss-teaser.html.twig b/agaric/templates/layout/node--rss-teaser.html.twig index 013223e..ca560b0 100644 --- a/agaric/templates/layout/node--rss-teaser.html.twig +++ b/agaric/templates/layout/node--rss-teaser.html.twig @@ -77,8 +77,8 @@ BOW! BOW BEFORE MY POWER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! {% set has_title_paragraph = false %} {% if content.field_body_paragraph %} - {% for i, paragraph in content.field_body_paragraph if i|first != '#' %} - {% if content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %} + {% for i, paragraph in content.field_body_paragraph %} + {% if i|first != '#' and content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %} {% set has_title_paragraph = true %} {{ paragraph }} {% endif %} diff --git a/agaric/templates/layout/node--teaser.html.twig b/agaric/templates/layout/node--teaser.html.twig index 56feebb..fed82e7 100644 --- a/agaric/templates/layout/node--teaser.html.twig +++ b/agaric/templates/layout/node--teaser.html.twig @@ -75,8 +75,8 @@ {% set has_title_paragraph = false %} {% if content.field_body_paragraph %} - {% for i, paragraph in content.field_body_paragraph if i|first != '#' %} - {% if content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %} + {% for i, paragraph in content.field_body_paragraph %} + {% if i|first != '#' and content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %} {% set has_title_paragraph = true %} {{ paragraph }} {% endif %} diff --git a/agaric/templates/patterns/title_paragraph/pattern-title-paragraph.html.twig b/agaric/templates/patterns/title_paragraph/pattern-title-paragraph.html.twig index 76ca276..1f9c51a 100644 --- a/agaric/templates/patterns/title_paragraph/pattern-title-paragraph.html.twig +++ b/agaric/templates/patterns/title_paragraph/pattern-title-paragraph.html.twig @@ -13,8 +13,8 @@ {% set title_paragraph_index = null %} {% set has_title_paragraph = false %} {% if paragraphs.field_body_paragraph %} - {% for i, paragraph in paragraphs.field_body_paragraph if i|first != '#' %} - {% if paragraphs.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %} + {% for i, paragraph in paragraphs.field_body_paragraph %} + {% if i|first != '#' and paragraphs.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %} {% set has_title_paragraph = true %} {% set title_paragraph_index = i %}