{%- paginate section.block by 5 -%} is not working. why?

DevsIT
Shopify Expert
45 2 9

{%- paginate section.block by 5 -%}

<div class="list-collections">
{%- for block in section.blocks -%}
{%- assign collection = collections[block.settings.collection] -%}
{%- assign alignment = block.settings.alignment -%}

{%- assign onboard = false -%}

{%- if collection == blank -%}
{%- assign onboard = true -%}
{%- endif -%}

 

 


<article
class="collection-item"
data-collection-item>
<figure class="collection-item-image" data-collection-item-image>
<a href="{{ collection.url }}">
{%- if onboard == false and collection.image -%}
{%
include 'rimg',
img: collection.image,
size: '350x',
lazy: true
%}
{%- elsif onboard == false and collection.products.first.featured_media.preview_image -%}
{%- assign product = collection.products.first -%}
{%
include 'rimg',
img: product.featured_media.preview_image,
size: '350x',
lazy: true
%}
{%- else -%}
{%- capture index -%}
{%- cycle '1', '2', '3', '4', '5', '6' -%}
{%- endcapture -%}
{{ 'collection-' | append: index | placeholder_svg_tag }}
{%- endif -%}
</a>
</figure>
<div class="collection-item-info" data-collection-item-info>
<span class="collection-item-title">
{%- unless onboard -%}
<a href="{{ collection.url }}">{{ collection.title }}</a>
{%- else -%}
{{ 'collection.item.onboarding.title' | t }}
{%- endunless -%}
</span>
{%- if display_description -%}
{%- if onboard -%}
<p class="collection-item-description">{{ 'collection.item.onboarding.description' | t }}</p>
{%- elsif collection.description != blank -%}
<div class="collection-item-description">{{ collection.description }}</div>
{%- endif -%}
{%- endif -%}
</div>
</article>


{%- endfor -%}


</div>

{%- endpaginate -%}

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on ce.shahabuddin@gmail.com regarding any help
Certified Shopify Expert | Skype : engr-shahabuddin | Whatsapp: +8801722574364
0 Likes
gina-gregory
Shopify Expert
710 48 176

Section blocks cannot be paginated.

0 Likes