Skip to content

Commit

Permalink
EWPP-4750: Fix the extra_attributes variable in node templates.
Browse files Browse the repository at this point in the history
  • Loading branch information
22Alexandra committed Oct 14, 2024
1 parent f2e5b3f commit 20b5453
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 31 deletions.
4 changes: 1 addition & 3 deletions templates/content/node--oe-call-proposals--teaser.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
{% set additional_information = additional_information|merge([additional_information_items]) %}
{% endif %}

{% set extra_attributes = [] %}

{# Add cache info from status field. #}
{% set bubble_cache = content.extra_field_oe_call_proposals_label_status|render %}
{% block content %}
Expand All @@ -29,6 +27,6 @@
'lists_variant': 'vertical',
'badges': badges,
'external_link': external_link,
'extra_attributes': extra_attributes,
'extra_attributes': extra_attributes|default([]),
}) }}
{% endblock %}
4 changes: 1 addition & 3 deletions templates/content/node--oe-call-tenders--teaser.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
{% set additional_information = additional_information|merge([additional_information_items]) %}
{% endif %}

{% set extra_attributes = [] %}

{# Add cache info from status field. #}
{% set bubble_cache = content.extra_field_oe_call_tenders_label_status|render %}
{% block content %}
Expand All @@ -29,6 +27,6 @@
'lists_variant': 'vertical',
'badges': badges,
'external_link': external_link,
'extra_attributes': extra_attributes,
'extra_attributes': extra_attributes|default([]),
}) }}
{% endblock %}
4 changes: 1 addition & 3 deletions templates/content/node--oe-consultation--teaser.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
{% set additional_information = additional_information|merge([additional_information_items]) %}
{% endif %}

{% set extra_attributes = [] %}

{# Add cache info from status field. #}
{% set bubble_cache = content.extra_field_oe_consultation_label_status|render %}
{% block content %}
Expand All @@ -29,6 +27,6 @@
'lists_variant': 'vertical',
'badges': badges,
'external_link': external_link,
'extra_attributes': extra_attributes,
'extra_attributes': extra_attributes|default([]),
}) }}
{% endblock %}
3 changes: 1 addition & 2 deletions templates/content/node--oe-event--teaser.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
{% endif %}
{% set detail = content.extra_field_oe_theme_content_event_teaser_details %}
{% set additional_information = [] %}
{% set extra_attributes = [] %}
{% block content %}
{{ pattern('list_item', {
'variant': variant|default('date'),
Expand All @@ -24,6 +23,6 @@
'lists_variant': 'vertical',
'badges': badges,
'external_link': external_link,
'extra_attributes': extra_attributes,
'extra_attributes': extra_attributes|default([]),
}) }}
{% endblock %}
3 changes: 1 addition & 2 deletions templates/content/node--oe-news--teaser.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
] %}
{% set detail = content.oe_teaser|field_value %}
{% set additional_information = [] %}
{% set extra_attributes = [] %}
{% apply spaceless %}
{% block content %}
{{ pattern('list_item', {
Expand All @@ -28,7 +27,7 @@
'lists_variant': 'vertical',
'badges': badges,
'external_link': external_link,
'extra_attributes': extra_attributes,
'extra_attributes': extra_attributes|default([]),
}) }}
{% endblock %}
{% endapply %}
4 changes: 1 addition & 3 deletions templates/content/node--oe-organisation--teaser.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
{% endfor %}
{% endif %}

{% set extra_attributes = [] %}

{% block content %}
{{ pattern('list_item', {
'variant': 'thumbnail_secondary',
Expand All @@ -37,6 +35,6 @@
'image': image_url ? { 'src': image_url },
'badges': badges,
'external_link': external_link,
'extra_attributes': extra_attributes,
'extra_attributes': extra_attributes|default([]),
}) }}
{% endblock %}
3 changes: 1 addition & 2 deletions templates/content/node--oe-page--teaser.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* Teaser template implementation for "Page" content type.
*/
#}
{% set extra_attributes = [] %}
{% block content %}
{{ pattern('list_item', {
'variant': 'default',
Expand All @@ -15,6 +14,6 @@
'lists_variant': 'vertical',
'badges': badges,
'external_link': external_link,
'extra_attributes': extra_attributes,
'extra_attributes': extra_attributes|default([]),
}) }}
{% endblock %}
4 changes: 1 addition & 3 deletions templates/content/node--oe-person--teaser.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
{% set additional_information = additional_information|merge([additional_information_items]) %}
{% endif %}

{% set extra_attributes = [] %}

{% block content %}
{{ pattern('list_item', {
'variant': 'thumbnail_secondary',
Expand All @@ -59,6 +57,6 @@
'image': content.portrait_image ? { 'src': content.portrait_image|render },
'badges': badges,
'external_link': external_link,
'extra_attributes': extra_attributes,
'extra_attributes': extra_attributes|default([]),
}) }}
{% endblock %}
3 changes: 1 addition & 2 deletions templates/content/node--oe-policy--teaser.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* Teaser template implementation for "Policy" content type.
*/
#}
{% set extra_attributes = [] %}
{% block content %}
{{ pattern('list_item', {
'variant': 'default',
Expand All @@ -15,6 +14,6 @@
'lists_variant': 'vertical',
'badges': badges,
'external_link': external_link,
'extra_attributes': extra_attributes,
'extra_attributes': extra_attributes|default([]),
}) }}
{% endblock %}
4 changes: 1 addition & 3 deletions templates/content/node--oe-project--teaser.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
{% set additional_information = additional_information|merge([additional_information_items]) %}
{% endif %}

{% set extra_attributes = [] %}

{% block content %}
{{ pattern('list_item', {
'variant': 'thumbnail_secondary',
Expand All @@ -30,6 +28,6 @@
'image': image_url ? { 'src': image_url },
'badges': badges,
'external_link': external_link,
'extra_attributes': extra_attributes,
'extra_attributes': extra_attributes|default([]),
}) }}
{% endblock %}
3 changes: 1 addition & 2 deletions templates/content/node--oe-publication--teaser.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/
#}
{% set image_url = content.oe_publication_thumbnail|field_value|render %}
{% set extra_attributes = [] %}
{% block content %}
{{ pattern('list_item', {
'variant': 'thumbnail_secondary',
Expand All @@ -22,6 +21,6 @@
'lists_variant': 'vertical',
'badges': badges,
'external_link': external_link,
'extra_attributes': extra_attributes,
'extra_attributes': extra_attributes|default([]),
}) }}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
'image_position': (loop.first or loop.index == 4) ? 'top' : '',
'divider': (loop.index == 2 or loop.index == 5) ? true : false,
'extra_classes': (loop.index == 2 or loop.index == 5) ? 'ecl-u-flex-grow-1 ecl-u-mb-m' : 'ecl-u-flex-grow-1',
'contextual_links': item.contextual_links
'contextual_links': item.contextual_links,
'extra_attributes': item.extra_attributes|default([]),
}, 'default') %}
{% set _items = _items|merge([_item]) %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
'image_position': 'top',
'divider': true,
'extra_classes': 'ecl-u-flex-grow-1',
'contextual_links': highlighted_item.contextual_links
'contextual_links': highlighted_item.contextual_links,
'extra_attributes': highlighted_item.extra_attributes|default([]),
}, 'default') %}
{% endif %}
Expand All @@ -46,7 +46,7 @@
'image_position': loop.first ? 'top' : '',
'divider': true,
'extra_classes': loop.last ? 'ecl-u-flex-grow-1' : 'ecl-u-flex-grow-1 ecl-u-mb-m',
'contextual_links': item.contextual_links
'contextual_links': item.contextual_links,
'extra_attributes': item.extra_attributes|default([]),
}, 'default') %}
{% set _items = _items|merge([_item]) %}
Expand Down

0 comments on commit 20b5453

Please sign in to comment.