From 39af4281ab172511cafd16859c86e9a0a0d28bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Tue, 20 Nov 2018 03:12:00 -0500 Subject: [PATCH] Update view paragraph template to add section wrapper if it's busted out of the content flow, anyhow. --- .../templates/paragraph/paragraph--view.html.twig | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/agaric/templates/paragraph/paragraph--view.html.twig b/agaric/templates/paragraph/paragraph--view.html.twig index a1920a1..eda4da4 100644 --- a/agaric/templates/paragraph/paragraph--view.html.twig +++ b/agaric/templates/paragraph/paragraph--view.html.twig @@ -1,11 +1,16 @@ -{# extends 'paragraph.html.twig' #} +{# For available variables see paragraph.html.twig #} {% - set classes = [ + set section_classes = [ 'section', not paragraph.isPublished() ? 'paragraph--unpublished' ] %} +{% if paragraph.field_style_escape_flow == true %} + {% set section_attributes = create_attribute().addClass(section_classes).setAttribute('data-headerbg', 'light') %} +
+{% endif %} + {% block paragraph %} {% block content %} @@ -13,3 +18,7 @@ {% endblock %} {% endblock paragraph %} + +{% if paragraph.field_style_escape_flow.value == true %} +
+{% endif %}