Shopify Concierge
posted this on October 27, 2010 15:10
I was asked via chat how to do show 3 columns in the gallery instead of 4, so here are the steps:
1. Change gallery.liquid
Open gallery.liquid (Theme > Template Editor in the Snippets section).
You'll see an if test at the top. Change it to:
{% if true or template == 'collection.sidebar' %}
This changes it to always assume a 3-col layout.
Now, change the image size from 'compact' to 'medium':
<img src="{{ product.images.first | product_img_url: 'medium' }}" alt="{{ product.title | strip_html | escape }}"/>
2. CSS Changes
Open styles.css.liquid and at the bottom add the following CSS (this will override the existing rules defined further up in the file):
/* 3 col gallery */
#products .product {padding:0 15px; width:300px;}
#products .image {height:288px; width:288px;}
#products .first_col {padding-left: 0;}
#products .last_col {padding-right: 0;}
That's it!
Comments
thanks for the above.
is there also a way to choose the number of products per page to multiples of 3? after making this change, on the theme settings page, the pull down for the number of products per page still reads 8, 12, 16 . . . {so only 12 makes even columns}
Ah, yes - I forgot about that.
Open settings.html and search for "collection_products". Change the options there. It should be around line 366.
I updated that in the collections and it didn't change anything in the store...