Skip to content

Commit

Permalink
EWPP-4496: Add the introduction field to highlighted lists patterns.
Browse files Browse the repository at this point in the history
  • Loading branch information
intelektron committed Jul 15, 2024
1 parent b564e22 commit 25e7ee8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Parameters:
- "columns" (int) (default: 2): The number of columns layout. It can be 2 or 4 and it defaults to 2.
- "title" (string) (default: ''): The Highlighted News Block title.
- "introduction" (string) (default: ''): A brief summary of the block content.
- "highlighted" (array) (default: []): The main item of the list compatible with the ECL Content Item component.
- "items" (array) (default: []): Highlighted News items compatible with the ECL Content Item component.
- "see_more" (array) (default: []): Predefined structure compatible with Link component.
Expand All @@ -19,6 +20,14 @@
</div>
</div>
{% endif %}
{% set _introduction = introduction|default('') %}
{% if _introduction %}
<div class="ecl-row">
<div class="ecl-content-item-block__introduction ecl ecl-u-mb-2xl ecl-col-12">
{{ _introduction }}
</div>
</div>
{% endif %}
{% if highlighted is not empty and items is not empty and _columns == 2 %}
<div class="ecl-row">
<div class="ecl-col-l-8 ecl-u-d-flex ecl-u-flex-column contextual-region">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ highlighted_list:
label: "Title"
description: "Highlighted list title"
preview: "Highlighted News"
introduction:
type: "text"
label: "Introduction"
description: "A brief summary of the content on the list."
preview:
'#markup': "<p>Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed cursus turpis vitae tortor. <strong>Aliquam eu nunc.</strong> Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Fusce egestas elit eget lorem.</p>"
highlighted_item:
type: "array"
label: "Highlighted item"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
{% include '@oe_theme/compositions/ec-component-highlighted-news-block/highlighted-news-block.html.twig' with {
'columns': 4,
'title': title|default(''),
'introduction': introduction|default(''),
'items': _items,
'see_more': _see_more,
'detail': detail|default(''),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@

{% include '@oe_theme/compositions/ec-component-highlighted-news-block/highlighted-news-block.html.twig' with {
'title': title|default(''),
'introduction': introduction|default(''),
'highlighted': _highlighted_item|default([]),
'items': _items,
'see_more': _see_more,
Expand Down

0 comments on commit 25e7ee8

Please sign in to comment.