Fixed image variable

This commit is contained in:
pmoreno.rodriguez 2023-02-03 22:28:04 +01:00 committed by GitHub
parent c89a3b76cd
commit 11c82f8f60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,7 @@
{% else %}
{% set show_pagination = true %}
{% endif %}
{% set image = page.media[page.header.primaryImage] %}
{% set image = page.media[page.header.primaryImage] ?: page.media.images|first %}
{% set title = page.title|raw %}
{# Set page title by taxonomy #}
@ -52,8 +52,6 @@
{% if image %}
{{ image.cropZoom(1038,437).loading('lazy').html(title, title, 'image featured')|raw }}
{% else %}
{{ image|first.cropZoom(1038,437).loading('lazy').html(title,title, 'image featured')|raw }}
{% endif %}
{{ page.content|raw }}