From 44b4b33d3882f5b9a06ac1531463c0a0a7117562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Mon, 19 Nov 2018 20:26:14 -0500 Subject: [PATCH] I think that's everything; perfect flow achieved --- agaric/templates/layout/node--full.html.twig | 40 +++++++++++++------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/agaric/templates/layout/node--full.html.twig b/agaric/templates/layout/node--full.html.twig index d480697..fb2875d 100644 --- a/agaric/templates/layout/node--full.html.twig +++ b/agaric/templates/layout/node--full.html.twig @@ -104,24 +104,38 @@ {% set bust_out = false %} {% set busted_out = false %} +{% 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) %} - {% if paragraph.field_style_escape_flow is not empty %} - {% set bust_out = paragraph.field_style_escape_flow %} - {% endif %} - {% if bust_out != true %} - {{ paragraph }} - {% endif %} - {% endfor %} +{% 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) %} + {% if paragraph.field_style_escape_flow is not empty %} + {% set bust_out = paragraph.field_style_escape_flow %} {% endif %} - + {% if bust_out != true and busted_out != true %} + {# We need to be in the flow but the lugeslide walls aren't up yet #}
- - {{ content|without('field_body_paragraph', 'field_authors', 'uid', 'created') }} + {% set walls_up = true %} + {% elseif bust_out == true and walls_up == true %} + {# We need to take the content flow sides down before our paragraph #}
+ {% set walls_up = false %} + {% endif %} + {{ paragraph }} + {% endif %} + {% endfor %} +{% endif %} + + +{{ content|without('field_body_paragraph', 'field_authors', 'uid', 'created') }} + +{% if walls_up == true %} + {# If the flow sides are still up after all is said and done, close 'em up. #} + + + +{% endif %}