for loop not working above 20 for section blocks.

Expert_Abubakar
New Member
2 0 1

This is the code for block. for loop does work only for 20 times and above not working. There is no limit in the scheme. is there any limit. When it crosses the 20 the content shows on the last item page. 

 

 

 

{% for block in section.blocks %}
            {% if block.type == 'image' %}
            {%- assign product_main = all_products[block.settings.main_pr_look] -%}    
            {%- assign img_1 = block.settings.image_1 -%}
            {%- assign img_2 = block.settings.image_2 -%}
            {%- assign img_3 = block.settings.image_3 -%}            
            
            {% if product.handle == product_main.handle %}
            {% render 'gallery_lookbook-item', block: block, img_1: img_1, img_2: img_2, img_3: img_3, product_main: product_main %} 
            {% endif %}
          {% endif %}
        
        {% endfor %}

 

 

 

0 Likes