【发布时间】:2016-06-02 00:47:34
【问题描述】:
我目前正在开发 Shopify 主题,我有一个所有产品的列表,我已将它们过滤为仅显示带有以下标签“Neoprene”的任何内容 - 我如何不将标记的产品限制为仅显示 4 ?
任何帮助将不胜感激!
<main class="wrapper">
<div class="grid">
<div class="grid__item">
<div class="large--one-whole">
{% for product in collections.all.products limit: 9999 %}
{% if product.tags contains 'Neoprene' %}
<div class="landing-product grid__item large--one-quarter medium--one-quarter small--one-half">
<a href="{{ product.url }}" class="img">
{% for image in product.images %}
<span class="grid-link__image-centered">
<img src="{{ product.featured_image.src | img_url: 'grande' }}" alt="{{ product.featured_image.alt | escape }}">
</span>
{% endfor %}
</a>
<a href="{{ product.url }}" class="title">
{{ product.title }}
</a>
<a href="{{ product.url }}" class="price">
{{ product.price | money }}
</a>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</main>
【问题讨论】:
标签: shopify