I am making a custom blog article template.
I want to display a list of categories depending on the TAGS section in the articles admin page .
How do I display this array with a comma separating each item (though not the last item)?
{% assign categories = “Emolient,Texture Enhancer,Plant Extract,Humectant,Emulsifier,Antimicrobial,PH Adjuster,Chelating Agent,Antioxidant,pH Adjuster,Solvent” | split: ‘,’ %}
Category:
{% for tag in article.tags %}
{% for cat_tag in categories %}
{% if cat_tag == tag %}
{{cat_tag}}
{% comment %}
I want a comma to separate each item, but not the last item
{% endcomment %}
{% endif %}
{% endfor %}
{% endfor %}