How do I create a standalone page listing vendors?

Shopify Partner
5 0 0

Hi there - a new client site (a fashion boutique) requires a section called 'labels' that lists all the Vendors.

I understand the code to loop through and list them:

{% for product_vendor in shop.vendors %}
  <li>{{ product_vendor | link_to_vendor  }}</li>
{% endfor %}

 

But how do I create a standalone page to show this? 

Looking at the official Shopify blog post here: - http://www.shopify.co.uk/technology/3033802-easy-access-to-vendors-and-product-types-in-liquid

...how is it possible to add an image for each as shown there? (Is that done manually via css / list items?)

 

Many thanks!

 

Paul

0 Likes
Shopify Expert
704 0 68

Modify your page.liquid template or create a new page.retailers.liquid template. To add an image you would need to hack around a little using an image naming convention, e.g. 

{% capture vendor_img %}{{ product_vendor.handle }}.jpg{% endcapture %}
{{ vendor_img | img_tag: product_vendor }}

 

I'm a million different people
0 Likes
Shopify Partner
5 0 0

Ah great, thanks Rick.

So, just like you can create a template such as index.specialpage.liquid, and browse to it with the url http://yourshop.com/?view=specialpage...

.... would the same apply here? What would the URL be to view page.retailers.liquid?

 

0 Likes
Shopify Expert
704 0 68

Like this

I'm a million different people
0 Likes
Shopify Partner
5 0 0

Thanks Rick, all sorted - much appreciated

0 Likes