diff --git a/modules/bp_quicklinks/templates/paragraph--bp-quicklinks.html.twig b/modules/bp_quicklinks/templates/paragraph--bp-quicklinks.html.twig index 21ffe025ac71d5b9ecab38717bbbced2e93e514c..305dba7908c1086db6b91be90fd6b53d8a5d926e 100644 --- a/modules/bp_quicklinks/templates/paragraph--bp-quicklinks.html.twig +++ b/modules/bp_quicklinks/templates/paragraph--bp-quicklinks.html.twig @@ -153,7 +153,7 @@ view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class, <h2>{{ content.bp_header }}</h2> {% endif %} <ul class="quicklinks {{ paragraph_id }}"> - {% for key, item in content.bp_quick_link|filter(key => key|first != '#') %} + {% for key, item in content.bp_quick_link|filter((value, key) => key|first != '#') %} <li class="quicklink quicklink-{{ key + 1 }}"> {{ item }} </li> diff --git a/templates/paragraph--bp-accordion.html.twig b/templates/paragraph--bp-accordion.html.twig index d997e41fd0b3412586e0d3d908d54aeb520395f5..5867d86c676cdba0646c965e7a47ad49a77ffee7 100644 --- a/templates/paragraph--bp-accordion.html.twig +++ b/templates/paragraph--bp-accordion.html.twig @@ -167,7 +167,7 @@ accordion_active ? 'paragraph--accordion_active--', {% set indicator_class = 'normal' %} {% endif %} {# Loop through all of the accordion sections. #} - {% for key, item in content.bp_accordion_section|filter(key => key|first != '#') %} + {% for key, item in content.bp_accordion_section|filter((value, key) => key|first != '#') %} {# Set variables if accordion should be shown. #} {% if item['#paragraph'].bp_show_button.value %} {% set show_accordion = ' in' %} diff --git a/templates/paragraph--bp-carousel.html.twig b/templates/paragraph--bp-carousel.html.twig index d7c615ab2d0714feeb59c3beff58fdffcbcb5583..e9116f31587f33560a39d132219acf8789015e68 100644 --- a/templates/paragraph--bp-carousel.html.twig +++ b/templates/paragraph--bp-carousel.html.twig @@ -170,12 +170,12 @@ view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class, {{ content|without('bp_slide_content','bp_slide_interval', 'bp_width', 'bp_background') }} <div{{ attributes.addClass(classes).setAttribute('id', paragraph_id).setAttribute('data-interval', slide_interval_classes).setAttribute('data-ride', 'carousel') }}> <ol class="carousel-indicators"> - {% for key, item in content.bp_slide_content|filter(key => key|first != '#') %} + {% for key, item in content.bp_slide_content|filter((value, key) => key|first != '#') %} <li class="{% if loop.first %}active{% endif %}" data-slide-to="{{ key }}" data-target="#{{ paragraph_id }}"></li> {% endfor %} </ol> <div class="carousel-inner" role="list"> - {% for key, item in content.bp_slide_content|filter(key => key|first != '#') %} + {% for key, item in content.bp_slide_content|filter((value, key) => key|first != '#') %} <div class="paragraph--layout-slideshow__slide-{{ key + 1 }} item carousel-item{% if loop.first %} active{% endif %}" role="listitem">{{ item }}</div> {% endfor %} </div> diff --git a/templates/paragraph--bp-modal.html.twig b/templates/paragraph--bp-modal.html.twig index 0f3a168c5c90b17d9d0e83043b5f80636b462fda..a6c5211ccaa9ca4a14abe9814b43b4e370eb09e6 100644 --- a/templates/paragraph--bp-modal.html.twig +++ b/templates/paragraph--bp-modal.html.twig @@ -176,14 +176,14 @@ view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class, </div> {% if content.bp_modal_body|render %} <div class="modal-body"> - {% for key, item in content.bp_modal_body|filter(key => key|first != '#') %} + {% for key, item in content.bp_modal_body|filter((value, key) => key|first != '#') %} {{ item }} {% endfor %} </div> {% endif %} {% if content.bp_modal_footer|render %} <div class="modal-footer"> - {% for key, item in content.bp_modal_footer|filter(key => key|first != '#') %} + {% for key, item in content.bp_modal_footer|filter((value, key) => key|first != '#') %} {{ item }} {% endfor %} </div> diff --git a/templates/paragraph--bp-tabs.html.twig b/templates/paragraph--bp-tabs.html.twig index 681b9b14d6b42cfc2e80d09461a45ecac4a72c9f..82cf12bce0c5b178a7b2b9ed3fc85318ececf7f8 100644 --- a/templates/paragraph--bp-tabs.html.twig +++ b/templates/paragraph--bp-tabs.html.twig @@ -155,13 +155,13 @@ view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class, {% endif %} <ul class="nav nav-tabs" role="tablist"> {# Loops through the tab sections to print the tab section titles. #} - {% for key, item in content.bp_tab_section|filter(key => key|first != '#') %} + {% for key, item in content.bp_tab_section|filter((value, key) => key|first != '#') %} <li role="presentation" class="{% if loop.first %}active{% endif %}"><a href="#{{ paragraph_id }}-{{ key + 1 }}" aria-controls="{{ item['#paragraph'].bp_tab_section_title.value }}" role="tab" data-toggle="tab">{{ item['#paragraph'].bp_tab_section_title.value }}</a></li> {% endfor %} </ul> <div class="tab-content"> {# Loops through the tab sections again to print the tab section bodies. #} - {% for key, item in content.bp_tab_section|filter(key => key|first != '#') %} + {% for key, item in content.bp_tab_section|filter((value, key) => key|first != '#') %} <div role="tabpanel" class="tab-pane{% if loop.first %} active{% endif %}" id="{{ paragraph_id }}-{{ key + 1 }}"> {% for body_key, body_item in item['#paragraph'].bp_tab_section_body %} {# Use the same render array as item and set the '#paragraph'. #}