From 72440d8d27fb9fd9e3fe351f1fa8ceafbcd73b88 Mon Sep 17 00:00:00 2001 From: "pmoreno.rodriguez" <60596353+pmoreno-rodriguez@users.noreply.github.com> Date: Fri, 3 Feb 2023 22:58:13 +0100 Subject: [PATCH] Improved the definition of variables. Improved the definition of title, subtitle and image variables. Added the featured image, subtitle and content --- templates/modular/features.html.twig | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/templates/modular/features.html.twig b/templates/modular/features.html.twig index a45bd20..f29c7e7 100644 --- a/templates/modular/features.html.twig +++ b/templates/modular/features.html.twig @@ -1,13 +1,21 @@ +{% set image = page.media[page.header.primaryImage] ?: page.media.images|first %} +{% set title = page.title|raw %} +{% set subtitle = page.header.subtitle|raw %} {% set columns = page.header.layout == 'standard' ? 'col-4 col-6-medium col-12-small' : 'col-6 col-12-small' %}
-

{{ page.title }}

- {% if page.header.subtitle %} -

{{ page.header.subtitle }}

+

{{ title }}

+ {% if subtitle %} +

{{ subtitle }}

{% endif %}
- {{ content|raw }} + + {% if image %} + {{ image.cropZoom(1038,437).loading('lazy').html(title, title, 'image featured')|raw }} + {% endif %} + + {{ page.content|raw }}
{% for feature in page.header.features %}