Minimal: Changing the collections per row in collection list on homepage

Solved

Minimal: Changing the collections per row in collection list on homepage

Perch
Tourist
3 1 0

Hello! I'm trying to change the number of collections shown per row in a collection list on the homepage in desktop view. Currently, it defaults to 5 per row, and I'd like it to show 3 per row so that the rows are even. Is there a way to do this in the code? 

 

Thanks for your help! 

 

Screen Shot 2021-11-24 at 11.58.01 AM.png

Accepted Solution (1)
Perch
Tourist
3 1 0

This is an accepted solution.

I figured it out! If anyone else has this issue, the solution I found is below. 

 

Section > collection.list.liquid

Edit Row 12 from

{% when '5' %}
{%- assign collection_item_width = 'small--one-half medium--one-third post-large--one-fifth' -%}
{%- assign collection_width = 235 -%}

 

to 

 

{% else %}
{%- assign collection_item_width = 'small--one-half medium--one-third post-large--one-third' -%}
{%- assign collection_width = 235 -%}

 

View solution in original post

Replies 3 (3)

JonWright
Shopify Partner
818 123 364

@Perch Just create multiple collection lists with only 3 collections per list. Like this:

 

Screenshot 2021-11-24 at 17.39.21.png

 

If helpful then please Like and Accept Solution

Owner of Neuralcandy Shopify Agency
Perch
Tourist
3 1 0

I tried this, but then it throws the mobile view off.. 

 

With one collection list, the mobile view shows two on each row seamlessly.

I'm wondering if there is way to have even rows on both desktop and mobile view.

 

Screen Shot 2021-11-24 at 12.46.36 PM.png

Perch
Tourist
3 1 0

This is an accepted solution.

I figured it out! If anyone else has this issue, the solution I found is below. 

 

Section > collection.list.liquid

Edit Row 12 from

{% when '5' %}
{%- assign collection_item_width = 'small--one-half medium--one-third post-large--one-fifth' -%}
{%- assign collection_width = 235 -%}

 

to 

 

{% else %}
{%- assign collection_item_width = 'small--one-half medium--one-third post-large--one-third' -%}
{%- assign collection_width = 235 -%}