Skip to main content

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

PropertyTypeDescription
titlestringCollection name
handlestringURL-safe identifier
productsarrayProducts in the collection
products_countintegerNumber 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>