0
Shopify製品のループ内で4つの製品の後ろに水平ブレイクを追加する方法を理解しようとしています。これはまったく可能ですか?私は彼らの文書を見てきましたが、ループを数えたり繰り返したりする可能性は示されていません。次のようにShopify 4つの製品の後ろに水平ブレイクを追加する
現在、私のループが見えます:
{% if collection.all_products_count > 0 %}
<div class="w-col w-col-12">
<div class="product-feed w-clearfix">
{% for product in collection.products %}
<a class="product product-collection w-inline-block" href="{{ product.url | within:collection }}">
<div class="reveal">
<img src="{{ product.featured_image | product_img_url: 'original' }}" alt="{{ product.title | escape }}" class="product-photo">
<img src="{{ product.images.last | product_img_url: 'original' }}" alt="{{ product.title | escape }}" class="hidden">
</div>
<h3 class="product-title">{{ product.title }}</h3>
<div class="product-price">{{ product.price | money }}</div>
<span class="shopify-product-reviews-badge" data-id="{{ product.id }}"></span>
</a>
{% endfor %}
</div>
{% assign count = paginate.pages %}
{% for part in (1..count) %}
<li {% if paginate.current_page == part %}class="active"{% endif %}><a href="{{ collection.url }}?page={{ forloop.index }}">{{ forloop.index }}</a></li>
{% endfor %}
{% else %}
<p>Sorry, there are no products in this collection</p>
{% endif %}