it shows only even image in slider odd images are hidden 0
I've assigned a variable in liquid and made odd and even classes I need one even and one odd in the image block class
was looking for the syntax on Google/Shopify cheatsheet/liquid Github wiki and can't seem to find anything that works
is this possible?
i was trying
{% for media in product.media %}
{% assign mod = forloop.index | modulo: 2 %}
<div class="image-block">
{%if mod == 0 %}
<div class="even">
<a href="{{ media.preview_image | img_url: product_image_zoom_size, scale: product_image_scale }}"
class=" product-single__thumbnail--{{ section.id }} even count-{{forloop.index}}"
data-thumbnail-id="{{ section.id }}-{{ media.id }}"> <img class="product-single__thumbnail-image" src="{{ media.preview_image | img_url: 'large', scale: 2 }}" alt="{{ thumbnailAlt }}"></a>
</div>
{%endif%}
{% for media in product.media %}
{% assign mod2 = forloop.index | modulo: 2 %}
{%if mod2 != 0 %}
<div class="odd">
<a href="{{ media.preview_image | img_url: product_image_zoom_size, scale: product_image_scale }}"
class=" product-single__thumbnail--{{ section.id }} odd count-{{forloop.index}}"
data-thumbnail-id="{{ section.id }}-{{ media.id }}"> <img class="product-single__thumbnail-image" src="{{ media.preview_image | img_url: 'large', scale: 2 }}" alt="{{ thumbnailAlt }}"></a>
</div>
{% break %}
{%endif%}
{% endfor %}
</div>
{% endfor %}
</div>[enter image description here][1]
cycle
tag to to the same, it is simple and easy to use. – Onkarcycle
– Onkar