From 15327bd95af6b46705bd6adde53178b9a84dc7c5 Mon Sep 17 00:00:00 2001 From: "pmoreno.rodriguez" <60596353+pmoreno-rodriguez@users.noreply.github.com> Date: Fri, 3 Feb 2023 20:53:53 +0100 Subject: [PATCH] Update banner and title with raw filter --- .../partials/simplesearch_item.html.twig | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/templates/partials/simplesearch_item.html.twig b/templates/partials/simplesearch_item.html.twig index 098b77a..0e392e9 100644 --- a/templates/partials/simplesearch_item.html.twig +++ b/templates/partials/simplesearch_item.html.twig @@ -1,25 +1,24 @@
- {% set title = page.title %} - {% set banner = page.media[page.header.primaryImage].loading('lazy').html(title,title)|raw ?: page.media.images.html(title,title)|raw|first %} - {% if banner %} -
- {{ banner }} -
- {% endif %} -
- + {% set title = page.title %} + {% set banner = page.media[page.header.primaryImage] ?: page.media.images|first %} -
- {% if config.plugins["translate-date"].enabled %} - {{ page.date|td(null, config.system.pages.dateformat.short) }} - {% else %} - {{ page.date|date(config.system.pages.dateformat.short) }} - {% endif %} -
+ {% if banner %} + + {% endif %} +
+ -

{{ page.summary|truncate(200)|raw }}

-
+
+ {{ page.date|date(config.system.pages.dateformat.short) }} +
+ +

{{ page.summary|truncate(200)|raw }}

+ +
+