February 23, 201610 yr Hi all,I have the following lines of code in my store: {% if settings.display_vendor_collection %} <a href="{{shop.url}}/collections/{{product.vendor}}" class="product-vendor-link"><span itemprop="vendor">{{ product.vendor }}</span></a> {% endif %} What I want to do is change the product.vendor output in the first part {{shop.url}}/collections/{{product.vendor}} to all lowercase and include a hyphen between the product vendor first name and last name.So currently it displays as 'Vendor Name' whereas I would like to change it to 'vendor-name'. Is that possible? The reason for doing so is that there is a collection for the product vendor and that is what the link above is linking to, but it does not work when there is a space between the words.Thanks,Al.
February 23, 201610 yr Brilliant Jack, thanks again man, worked perfectly! Luckily the templating language is similar to Craft CMS. If you're curious there's a list of these here https://docs.shopify.com/themes/liquid/filters/string-filters.
Create an account or sign in to comment