{% for article in blogs.variety-guides.articles %}
{% assign TVname = product.title | downcase | split: "-" | slice: 0 | string %}
{{ TVname }}
{% if article.tags contains "{{ TVname }}" %}
<img src="{{ article.image | img_url: '200x200' }}" alt=""><br>
{{- article.title | link_to: article.url }}
{% else %}
<p>No Articles for this Product.</p>
{% endif %}
{% endfor %}
Hello all!
I have a feeling I am going about this the completely wrong way, but essentially at the bottom of each individual product page I want to pull up relevant articles tagged with the product name in a quick and dirty way, in this example the product title would be something like “Samsung TU700D - 65” 4k TV" and the TVname string would look for all articles written and tagged with “samsungtu700d” and display them at the bottom of the page. I am currently having trouble comparing the TVname string to the article.tag, I’m a bit lost here.
Any help is greatly appreciated.