From a0c3132b7ddb48b3d25d68350f3d05f225f637f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Wed, 24 Oct 2018 18:52:50 -0400 Subject: [PATCH] Include check for paragraphs, fix indent, acknowledge confusion --- .../layout/layout--onecol--node.html.twig | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/agaric/templates/layout/layout--onecol--node.html.twig b/agaric/templates/layout/layout--onecol--node.html.twig index 3df50fa..584ead5 100644 --- a/agaric/templates/layout/layout--onecol--node.html.twig +++ b/agaric/templates/layout/layout--onecol--node.html.twig @@ -45,12 +45,18 @@ {% endif %}
- {% for i, paragraph in content.field_body_paragraph if i|first != '#' %} - {% if i is not same as(title_paragraph_index) %} - {{ paragraph }} +
+ {% 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) %} + {{ paragraph }} + {% endif %} + {% endfor %} {% endif %} - {% endfor %} - {{ content }} + {# No, i do not understand why content doesn't print the paragraphs but only + content.content does that #} + {{ content }} +
{% endif %}