From 0d59e5861811c8d21c0b1343ce5397574c86998d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Wed, 24 Oct 2018 16:46:23 -0400 Subject: [PATCH] Commit proof of concept because wow --- .../layout/layout--onecol--node.html.twig | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/agaric/templates/layout/layout--onecol--node.html.twig b/agaric/templates/layout/layout--onecol--node.html.twig index 13fa121..d984cea 100644 --- a/agaric/templates/layout/layout--onecol--node.html.twig +++ b/agaric/templates/layout/layout--onecol--node.html.twig @@ -22,11 +22,16 @@ {# expected if statement would start here #} {% set classes = classes|merge(['is-dark']) %} +{% set title_paragraph_index = 'silly' %} +{% set tpi = null %} {% set has_title_paragraph = false %} {% if content.field_body_paragraph %} - {% for paragraph in content.field_body_paragraph['#items'] %} + {% for i, paragraph in content.field_body_paragraph['#items'] %} {% if paragraph.entity.type.0.entity.id == 'title' %} {% set has_title_paragraph = true %} + {{ content.field_body_paragraph[i] }} + {% set title_paragraph_index = i %} + {% set tpi = i %} {% endif %} {% endfor %} {% endif %} @@ -42,6 +47,21 @@ {% endif %} -{{ content.content }} +{{ content.field_simple_multivalue[0] }} +{% for i in 1..2 %} + {{ content.field_simple_multivalue[i] }} +{% endfor %} + +AND HERE COMES THE REST
+No number huh? {{ title_paragraph_index }} +
Ehh? {{ tpi }} +
Gah. {{ has_title_paragraph }} + + {% for i, paragraph in content.field_body_paragraph if i|first != '#' %} + NOO NUMBERSSS {{ i }} + {{ paragraph }} + {% endfor %} + {{ content|without('content', 'field_body_paragraph') }} + {% endif %}