Documentation Index
Fetch the complete documentation index at: https://docs.fourthwall.com/llms.txt
Use this file to discover all available pages before exploring further.
Access product collections through the global collections object using a collection handle.
Accessing a collection
{%- assign collection = collections['all'] -%}
{% for product in collection.products limit: 8 %}
{{ product.title }}
{% endfor %}
Collection properties
| Property | Type | Description |
|---|
title | string | Collection name |
handle | string | URL-safe identifier |
products | array | Products in the collection |
products_count | integer | Number of products |
Example
{%- assign collection = collections['all'] -%}
<section>
<h2>{{ collection.title }}</h2>
<div class="product-grid">
{% for product in collection.products limit: 8 %}
<div class="product-card">
{% if product.featured_image %}
<img
src="{{ product.featured_image | img_url: 'large' }}"
alt="{{ product.title }}"
>
{% endif %}
<h3>{{ product.title }}</h3>
<p>{{ product.price | money }}</p>
<a href="{{ product.url | localized_url }}">View</a>
</div>
{% endfor %}
</div>
</section>