Here's a rather arcane one for you. It is very technical, very liquid (i.e. pertains to Shopify's templating language), and probably would be of interest to at least 2 people on the planet that I can think of, so please feel free to skip over.
Anyways...
In collection.liquid, you can find out what collection you are operating on using {{ collection.handle }}. For most collections it works quite well:
Collection | URL | {{ collection.handle }} |
All products in "shoes" | /collections/shoes | shoes |
All products in "shoes", filtered by those tagged "High Heels" | /collections/shoes/high-heels | shoes |
All products of type "expensive" | /collections/expensive | expensive |
All products made by Manolo Blahnik | /collections/vendors?q=blahnik | null |
Can you spot the odd one out?
That's right - collection.handle is null on the collection page when querying by vendors.
So, if you need to find out if you are on a vendor collection page, you will need to do something like this:
{% if collection.handle == null %}
Browsing products lovingly crafted
by {{ collection.products[0].vendor }}.
{% endif %}
Posted by: Miguel S. | 2009.09.29 at 11:54 PM
Posted by: margot | 2010.02.11 at 07:01 PM
Posted by: dave | 2010.07.03 at 05:37 AM
Posted by: joey | 2011.05.27 at 04:23 PM