From 75b480cbcf3327a1dd188cc7629f9aa81c9f9266 Mon Sep 17 00:00:00 2001 From: nagyad Date: Thu, 14 Dec 2023 17:39:54 +0100 Subject: [PATCH] EWPP-3810: Update featured item template to have images clickable. --- .../featured_item/pattern-featured-item.html.twig | 12 +++++++----- tests/src/Kernel/fixtures/rendering.yml | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/templates/patterns/featured_item/pattern-featured-item.html.twig b/templates/patterns/featured_item/pattern-featured-item.html.twig index 35d724d8fc..9d3bf21530 100644 --- a/templates/patterns/featured_item/pattern-featured-item.html.twig +++ b/templates/patterns/featured_item/pattern-featured-item.html.twig @@ -11,11 +11,13 @@ #} {% if link.href is not empty %} {% set _title = { - 'label': title, - 'path': link.href, - 'type': "standalone", - 'external': external_link, - 'icon_path': ecl_icon_path + link { + label: title, + path: link.href, + type: "standalone", + external: external_link, + icon_path: ecl_icon_path + } } %} {% if variant == 'extended' %} {% set _description %} diff --git a/tests/src/Kernel/fixtures/rendering.yml b/tests/src/Kernel/fixtures/rendering.yml index 9eb086b432..41c1c95e83 100644 --- a/tests/src/Kernel/fixtures/rendering.yml +++ b/tests/src/Kernel/fixtures/rendering.yml @@ -2382,6 +2382,7 @@ assertions: count: "img.ecl-card__image[src=\"http://via.placeholder.com/120x80\"]": 1 + 'article.ecl-card picture[data-ecl-picture-link]': 1 'h1.ecl-content-block__title a.ecl-link--standalone[href="https://example.com"]': 1 'a.ecl-button': 0 'article.ecl-card div.ecl-card__body ul.ecl-content-block__label-container': 1 @@ -2414,6 +2415,7 @@ assertions: count: "img.ecl-card__image[src=\"http://via.placeholder.com/120x80\"]": 1 + 'article.ecl-card picture[data-ecl-picture-link]': 1 'h1.ecl-content-block__title a.ecl-link--standalone[href="https://example.com"]': 1 'a.ecl-button': 0 'article.ecl-card div.ecl-card__body ul.ecl-content-block__label-container': 0