diff --git a/templates/compositions/ec-component-content-item-block/content-item-block.html.twig b/templates/compositions/ec-component-content-item-block/content-item-block.html.twig index 8cbe5355a..c77e7080f 100644 --- a/templates/compositions/ec-component-content-item-block/content-item-block.html.twig +++ b/templates/compositions/ec-component-content-item-block/content-item-block.html.twig @@ -70,7 +70,7 @@ {% if loop.last %} {% set last_item_css = "last-item" %} {% endif %} -
+
{% for _item in column %} {% if loop.last %} {% set last_item_column_css = "last-item-column" %} @@ -78,7 +78,7 @@ {% set last_item_column_css = last_item_column_css ~ " " ~ last_item_css %} {% endif %} {% endif %} -
+
{{ _item }}
{% endfor %} @@ -93,7 +93,7 @@ {% if loop.last %} {% set last_item_column_css = last_item_column_css ~ " last-item" %} {% endif %} -
+
{{ _item }}
{% endfor %} diff --git a/templates/compositions/ec-component-highlighted-news-block/highlighted-news-block.html.twig b/templates/compositions/ec-component-highlighted-news-block/highlighted-news-block.html.twig index e2173190c..b594355a6 100644 --- a/templates/compositions/ec-component-highlighted-news-block/highlighted-news-block.html.twig +++ b/templates/compositions/ec-component-highlighted-news-block/highlighted-news-block.html.twig @@ -19,10 +19,10 @@ {% endif %} {% if highlighted is not empty and items is not empty %}
-
+
{{ highlighted }}
-
+
{% for item in items %} {{ item }} {% endfor %} diff --git a/templates/patterns/file_teaser/file_teaser.ui_patterns.yml b/templates/patterns/file_teaser/file_teaser.ui_patterns.yml index fce4d820a..a9dc61e03 100644 --- a/templates/patterns/file_teaser/file_teaser.ui_patterns.yml +++ b/templates/patterns/file_teaser/file_teaser.ui_patterns.yml @@ -113,3 +113,8 @@ file_teaser: preview: - label: "Highlighted" variant: "highlight" + contextual_links: + type: "array" + label: "Contextual links" + description: "Render array of contextual links" + preview: ~ diff --git a/templates/patterns/file_teaser/pattern-file-teaser.html.twig b/templates/patterns/file_teaser/pattern-file-teaser.html.twig index 185f3a1ea..1c7621afc 100644 --- a/templates/patterns/file_teaser/pattern-file-teaser.html.twig +++ b/templates/patterns/file_teaser/pattern-file-teaser.html.twig @@ -100,6 +100,8 @@ } %} {% endif %} +{{ contextual_links }} + {% include '@ecl-twig/file' with { 'title': file.title, 'description': teaser|smart_trim(_length), diff --git a/templates/patterns/link/link.ui_patterns.yml b/templates/patterns/link/link.ui_patterns.yml index f25f97040..e050a7974 100644 --- a/templates/patterns/link/link.ui_patterns.yml +++ b/templates/patterns/link/link.ui_patterns.yml @@ -25,3 +25,8 @@ link: label: "External link" description: "Whether the URL is external or not." preview: true + contextual_links: + type: "array" + label: "Contextual links" + description: "Render array of contextual links" + preview: ~ \ No newline at end of file diff --git a/templates/patterns/link/pattern-link.html.twig b/templates/patterns/link/pattern-link.html.twig index fc56390c8..34e1bf42b 100644 --- a/templates/patterns/link/pattern-link.html.twig +++ b/templates/patterns/link/pattern-link.html.twig @@ -4,6 +4,7 @@ * Link pattern. */ #} +{{ contextual_links }} {% include '@ecl-twig/link' with { link: { type: variant|default('standalone'), diff --git a/templates/patterns/list_item/list_item.ui_patterns.yml b/templates/patterns/list_item/list_item.ui_patterns.yml index 290a963f2..11556a9b2 100644 --- a/templates/patterns/list_item/list_item.ui_patterns.yml +++ b/templates/patterns/list_item/list_item.ui_patterns.yml @@ -33,6 +33,11 @@ list_item: label: "List item: cancelled event" description: "Default list item elements and date." fields: + contextual_links: + type: "array" + label: "Contextual links" + description: "Render array of contextual links" + preview: ~ url: type: "Url" label: "URL" diff --git a/templates/patterns/list_item/pattern-list-item.html.twig b/templates/patterns/list_item/pattern-list-item.html.twig index 27f5f96fc..d84cf1132 100644 --- a/templates/patterns/list_item/pattern-list-item.html.twig +++ b/templates/patterns/list_item/pattern-list-item.html.twig @@ -16,6 +16,7 @@ - "external_link" (bool) (default: false): Whether the link is external or not. - "lists" (array) (default: []): Array of lists compatible with ECL Description list component. - "divider" (bool) (default: false): Whether to set a divider below the item. + - "contextual_links" (array) (default: ''): Render array for contextual links. - "extra_classes" (string) (default: '') #} @@ -156,6 +157,8 @@ {% endfor %} {% endif %} +{{ contextual_links }} + {% include '@ecl-twig/content-item' with { picture: picture|default([]), labels: labels|default([]),