CollectionIsolated
{% if section.settings.title != blank %}
{% endif %}
Our Collection
+
{% for block in section.blocks limit: section.blocks.size %}
{% case section.settings.grid %}
{% when 1 %}
{%- assign grid_item_width = 'one-whole' -%}
{% when 2 %}
{%- assign grid_item_width = 'small--one-half medium-up--one-half' -%}
{% when 3 %}
{%- assign grid_item_width = 'small--one-half medium-up--one-third' -%}
{% when 4 %}
{%- assign grid_item_width = 'small--one-half medium-up--one-quarter' -%}
{% else %}
{%- assign grid_item_width = 'small--one-half medium-up--one-third' -%}
{% endcase %}
{%- assign collection = collections[block.settings.collection] -%}
{% if collection == empty %}
{% comment %}add default state for collection block in storefront editor{% endcomment %}
{% capture collection_title %}{{ 'homepage.onboarding.collection_title' | t }}{% endcapture %}
{% else %}
{% capture collection_title %}{{ collection.title | escape }}{% endcapture %}
{% endif %}
{% if collection.image %}
{% assign no_collection_image = false %}
{%- assign collection_image = collection.image -%}
{% elsif collection.products.first and collection.products.first.images != empty %}
{%- assign collection_image = collection.products.first.featured_image -%}
{% else %}
{%- assign collection_image = blank -%}
{% endif %}
{% endfor %}