首页 > 解决方案 > Shopify - 对收藏列表进行分页

问题描述

我在 Shopify 中有 100 多个系列。如何进行分页或无限滚动以显示此列表?不是集合中的产品列表,而是所有集合的列表。

标签: shopify

解决方案


我遇到了同样的问题,这就是您对list-collections.liquid模板进行分页的方式。在此示例中,25可以与另一个整数或字符串limit交换。

{%- paginate collections by 25 -%}
     ...
     {%- for collection in collections -%}
          ...
     {%- endfor -%}
     ...
{%- endpaginate -%}

推荐阅读