Hi
I am new to TWIG and racing uphill.
I am stymied as I try to test whether two images are the same. One is set by a header variable - value is ‘Halloween.jpg’. The other is an item in a loop over the images in the page - value is ‘pnhbquark/blog/ Halloween16/Halloween.jpg’. I simply want to display all the images except Halloween.jpg, and whatever I try displays all of the images.
For the test I have tried
{% set raw_url = page.media[lead_image].url %}
{# this yields exactly the same as image #}
{% for image in page.media.images %}
{% if raw_url == image %}
SAME image
{% else %}
{{image}}
{% endif %}
{% endfor %}
{# ALSO tried {% if image|ends_with(lead_image) #}
{# and a few other things #)
Thanks
Norma