In the following:
{% for image in page.media.images | slice(0,1) %}
{% if image is not null %}
{{ image.cropZoom(500, 500).html() }}
{% else %}
<img src="{{ theme_url }}/css/images/square-placeholder.png">
{% endif %}
{% endfor %}
I was expecting image
to be null
if there were no images attached to the page. No? Advice appreciated because no matter how I word the if the image is always something. How do I dump the variable or array?