Supply Theme - Change "Shop for" to title of section

I’ve seen a number of answers demonstrating that “shop for” on the supply theme can be changed in “languages”. However, this changes all of the “shop for” options.

What I would like is to label each collection list on my homepage with the title of the collection. Here is my page: www.tensor3d.com.

For example, the first section I would like to call “Printers”. Second section “Parts”. And Third Section “Filaments”.

Is this possible? Thanks a ton!

Mike

I’m curious, in the Theme customizer… when you click on the section for the collection list, is there a place to edit the Header?

Not that is obvious. I’ve searched around the whole theme.

Ah sorry, wish I could help more! I just don’t have a store going in that theme to know for sure where it is.

Hi @tensor3d ,

Please send me the code of collection-list.liquid file, I will help you add option to change it

Hi, thanks for your help. It’s pretty empty, here’s the code from that file.

{% comment %}
The contents of the collection.liquid template can be found in /sections/collection-template.liquid
{% endcomment %}

{% section ‘collection-list-template’ %}

Hi @tensor3d ,

Are you sure you opened the correct file? I tried checking on Supply Theme and it shows completely different. Go to sections > collection-list.liquid file

You’re right, I messed that up. Here’s the correct file.

Hi @tensor3d ,

Please change code:


---

## {{ section.settings.title }}

{{ 'homepage.featured_collections.more_categories' | t }} ›

{%- assign index = 0 -%}
{%- assign index = section.blocks.size -%}

{% case index %}
{% when 1 %}
{%- assign featured_collection_width = 'one-whole' -%}
{%- assign featured_collection_size = '1024x' -%}
{%- assign width = '1000' %}
{%- assign height = '1000' %}
{% when 2 %}
{%- assign featured_collection_width = 'one-half' -%}
{%- assign featured_collection_size = '540x' -%}
{%- assign width = '480' %}
{%- assign height = '480' %}
{% when 3 %}
{%- assign featured_collection_width = 'small--one-half one-third' -%}
{%- assign featured_collection_size = '345x' -%}
{%- assign width = '310' -%}
{%- assign height = '310' -%}
{% when 4 %}
{%- assign featured_collection_width = 'small--one-half one-quarter' -%}
{%- assign featured_collection_size = '250x' -%}
{%- assign width = '225' -%}
{%- assign height = '225' -%}
{% when 5 %}
{%- assign featured_collection_width = 'small--one-half medium--one-third large--one-fifth' -%}
{%- assign featured_collection_size = '195x' -%}
{%- assign width = '175' -%}
{%- assign height = '175' -%}
{% when 6 %}
{%- assign featured_collection_width = 'small--one-half medium--one-third large--one-sixth' -%}
{%- assign featured_collection_size = '195x' -%}
{%- assign width = '140' -%}
{%- assign height = '140' -%}
{% endcase %}

{% if index > 0 %}
{% for block in section.blocks %}
{%- assign featured = block.settings.collection %}
{% include 'featured-collection' with width: width, height: height %}
{% endfor %}
{% comment %}
{% else %}
{%- assign index = 0 %}
{% for collection in collections limit:7 %}
{% unless index >= 6 %}
{% unless collection.handle == 'frontpage' %}
{%- assign featured = collection.handle %}
{% include 'featured-collection' %}
{%- assign index = index | plus: 1 %}
{% endunless %}
{% endunless %}
{% endfor %}
{% endcomment %}
{% endif %}

{% if index == 0 %}

{{ 'homepage.featured_collections.no_collections_html' | t }}

{% for i in (1..6) %}

{% capture current %}{% cycle 1, 2, 3, 4, 5, 6 %}{% endcapture %}
{{ 'collection-' | append: current | placeholder_svg_tag: 'placeholder-svg' }}

{{ 'homepage.featured_collections.example_collection' | t }}

{% endfor %}

{% endif %}

 

{% schema %}
{
"name": {
"cs": "Seznam kolekcí",
"da": "Kollektionsliste",
"de": "Kategorieliste",
"en": "Collection list",
"es": "Lista de colecciones",
"fi": "Kokoelmaluettelo",
"fr": "Page des collections",
"it": "Elenco delle collezioni",
"ja": "コレクションリスト",
"ko": "컬렉션 목록",
"nb": "Samlingsliste",
"nl": "Collectielijst",
"pl": "Lista kolekcji",
"pt-BR": "Lista de coleções",
"pt-PT": "Lista de coleções",
"sv": "Kollektionslista",
"th": "รายการคอลเลกชัน",
"tr": "Koleksiyon listesi",
"vi": "Danh sách bộ sưu tập",
"zh-CN": "产品系列列表",
"zh-TW": "商品系列清單"
},
"class": "collection-list-section",
"max_blocks": 6,
"settings": [
    {
      "type": "text",
      "id": "title",
      "label": "Heading",
      "default": "Shop For"
    }
  ],
"presets": [
{
"name": {
"cs": "Seznam kolekcí",
"da": "Kollektionsliste",
"de": "Kategorieliste",
"en": "Collection list",
"es": "Lista de colecciones",
"fi": "Kokoelmaluettelo",
"fr": "Page des collections",
"it": "Elenco delle collezioni",
"ja": "コレクションリスト",
"ko": "컬렉션 목록",
"nb": "Samlingsliste",
"nl": "Collectielijst",
"pl": "Lista kolekcji",
"pt-BR": "Lista de coleções",
"pt-PT": "Lista de coleções",
"sv": "Kollektionslista",
"th": "รายการคอลเลกชัน",
"tr": "Koleksiyon listesi",
"vi": "Danh sách bộ sưu tập",
"zh-CN": "产品系列列表",
"zh-TW": "商品系列清單"
},
"category": {
"cs": "Kolekce",
"da": "Kollektioner",
"de": "Kategorien",
"en": "Collections",
"es": "Colecciones",
"fi": "Kokoelmat",
"fr": "Collections",
"it": "Collezioni",
"ja": "コレクション",
"ko": "컬렉션",
"nb": "Samlinger",
"nl": "Collecties",
"pl": "Kolekcje",
"pt-BR": "Coleções",
"pt-PT": "Coleções",
"sv": "Produktserier",
"th": "คอลเลกชัน",
"tr": "Koleksiyonlar",
"vi": "Bộ sưu tập",
"zh-CN": "产品系列",
"zh-TW": "商品系列"
},
"blocks": [
{
"type": "collection"
},
{
"type": "collection"
}
]
}
],
"blocks": [
{
"type": "collection",
"name": {
"cs": "Kolekce",
"da": "Kollektion",
"de": "Kategorie",
"en": "Collection",
"es": "Colección",
"fi": "Kokoelma",
"fr": "Collection",
"it": "Collezione",
"ja": "コレクション",
"ko": "컬렉션",
"nb": "Samling",
"nl": "Collectie",
"pl": "Kolekcja",
"pt-BR": "Coleção",
"pt-PT": "Coleção",
"sv": "Produktserie",
"th": "คอลเลกชัน",
"tr": "Koleksiyon",
"vi": "Bộ sưu tập",
"zh-CN": "收藏",
"zh-TW": "商品系列"
},
"settings": [
{
"id": "collection",
"type": "collection",
"label": {
"cs": "Kolekce",
"da": "Kollektion",
"de": "Kategorie",
"en": "Collection",
"es": "Colección",
"fi": "Kokoelma",
"fr": "Collection",
"it": "Collezione",
"ja": "コレクション",
"ko": "컬렉션",
"nb": "Samling",
"nl": "Collectie",
"pl": "Kolekcja",
"pt-BR": "Coleção",
"pt-PT": "Coleção",
"sv": "Produktserie",
"th": "คอลเลกชัน",
"tr": "Koleksiyon",
"vi": "Bộ sưu tập",
"zh-CN": "收藏",
"zh-TW": "商品系列"
}
}
]
}
]
}
{% endschema %}

Then you can edit heading at Customize.

You are the hero of the day! Thank you!

1 Like