Hello, on my site im trying to link every vendor under my product which would test if there is a collection with the vendor name and display a link to the collection. If there is no collection it will link to a url with “/collections/vendors?q=”.
Currently this is the part that works:
Brand: {{ product.vendor | link_to_vendor }}
Which links to a url with “/collections/vendors?q=”
Here’s my code that i’ve tried but doesn’t work.
{% if product.collections contains product.vendor %}
Hi.
Would it be possible to split the vendor string into arrays?
I’m using the product vendor thing to indicate author(s) of the books I’m selling rather than the publisher.
Would it be possible to add some variation of | split: ‘and’
into this code: