From 60233ec4fec1d29234757167522d7ea94c21b055 Mon Sep 17 00:00:00 2001 From: Brian Canini <canini.16@osu.edu> Date: Fri, 22 Apr 2022 10:11:29 -0400 Subject: [PATCH] adding section title to templates --- .../templates/paragraph/paragraph--column_one.html.twig | 5 ++++- .../templates/paragraph/paragraph--columns_four.html.twig | 6 ++++-- .../templates/paragraph/paragraph--columns_three.html.twig | 5 ++++- .../templates/paragraph/paragraph--columns_two.html.twig | 6 ++++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/web/themes/asc_bootstrap/templates/paragraph/paragraph--column_one.html.twig b/web/themes/asc_bootstrap/templates/paragraph/paragraph--column_one.html.twig index 4026aa7b2b..c6a9f9b31e 100644 --- a/web/themes/asc_bootstrap/templates/paragraph/paragraph--column_one.html.twig +++ b/web/themes/asc_bootstrap/templates/paragraph/paragraph--column_one.html.twig @@ -55,7 +55,7 @@ {% set thecont = [] %} {% set rand = random(56748) %} - {% for item in content|without('field_column_style_2')|without('field_background_color') %} + {% for item in content|without('field_background_color')|without('field_column_title1')|without('field_publish_section_title') %} {% set thecont = thecont|merge(item) %} {% endfor %} @@ -93,6 +93,9 @@ </div> {% else %} + {% if content.field_publish_section_title['#items'].value == 1 %} + <h2 class="sec-title">{{ content.field_column_title1.0 }}</h2> + {% endif %} <div class="col-xs-12 col-f"> {{ thecont[0] }} </div> diff --git a/web/themes/asc_bootstrap/templates/paragraph/paragraph--columns_four.html.twig b/web/themes/asc_bootstrap/templates/paragraph/paragraph--columns_four.html.twig index 3d1c44e4d0..dbbb219b49 100644 --- a/web/themes/asc_bootstrap/templates/paragraph/paragraph--columns_four.html.twig +++ b/web/themes/asc_bootstrap/templates/paragraph/paragraph--columns_four.html.twig @@ -62,7 +62,7 @@ {% set thecont = [] %} {% set rand = random(56748) %} - {% for item in content|without('field_column_style_4')|without('field_background_color') %} + {% for item in content|without('field_column_style_4')|without('field_background_color')|without('field_publish_section_title')|without('field_column_title4') %} {% set thecont = thecont|merge(item) %} {% endfor %} @@ -216,7 +216,9 @@ {% elseif thecont[0]['#paragraph'].type.target_id != 'advanced_callout_box' %} - + {% if content.field_publish_section_title['#items'].value == 1 %} + <h2 class="sec-title">{{ content.field_column_title4 }}</h2> + {% endif %} <div class="{{ leftwidth }} col-l"> {{ thecont[0] }} </div> diff --git a/web/themes/asc_bootstrap/templates/paragraph/paragraph--columns_three.html.twig b/web/themes/asc_bootstrap/templates/paragraph/paragraph--columns_three.html.twig index 663d4f735d..5b5cdecbba 100644 --- a/web/themes/asc_bootstrap/templates/paragraph/paragraph--columns_three.html.twig +++ b/web/themes/asc_bootstrap/templates/paragraph/paragraph--columns_three.html.twig @@ -85,7 +85,7 @@ {% set thecont = [] %} {% set rand = random(56748) %} - {% for item in content|without('field_column_style_3')|without('field_background_color') %} + {% for item in content|without('field_column_style_3')|without('field_background_color')|without('field_publish_section_title')|without('field_column_title3') %} {% set thecont = thecont|merge(item) %} {% endfor %} @@ -248,6 +248,9 @@ {% elseif thecont[0]['#paragraph'].type.target_id != 'advanced_callout_box' %} + {% if content.field_publish_section_title['#items'].value == 1 %} + <h2 class="sec-title">{{ content.field_column_title3 }}</h2> + {% endif %} <div class="{{ leftwidth }} col-l"> {{ thecont[0] }} </div> diff --git a/web/themes/asc_bootstrap/templates/paragraph/paragraph--columns_two.html.twig b/web/themes/asc_bootstrap/templates/paragraph/paragraph--columns_two.html.twig index 91946a4b7c..45f49ec700 100644 --- a/web/themes/asc_bootstrap/templates/paragraph/paragraph--columns_two.html.twig +++ b/web/themes/asc_bootstrap/templates/paragraph/paragraph--columns_two.html.twig @@ -78,7 +78,7 @@ {% set thecont = [] %} {% set rand = random(56748) %} - {% for item in content|without('field_column_style_2')|without('field_background_color') %} + {% for item in content|without('field_column_style_2')|without('field_background_color')|without('field_publish_section_title')|without('field_column_title2') %} {% set thecont = thecont|merge(item) %} {% endfor %} @@ -235,7 +235,9 @@ {% elseif thecont[0]['#paragraph'].type.target_id != 'advanced_callout_box' %} - + {% if content.field_publish_section_title['#items'].value == 1 %} + <h2 class="sec-title">{{ content.field_column_title2 }}</h2> + {% endif %} <div class="{{ leftwidth }} col-l"> {{ thecont[0] }} </div> -- GitLab