Hello, everyone!
I have a metafield that is a single string list.
Let’s say it contains these values.
- Image1
- Image2
- Image3
The three above are .png s loaded in shopify files section.
On the product page I want the image/images to be printed based on the content of the metafield, so this is my code:
{% when 'description' %}
{% if product.metafields.c_f.contenuto %}
{% for contenuto in product.metafields.c_f.contenuto.value %}
{% assign file_name = contenuto | append: '.png' | downcase | replace: ' ', '_' %}
{{ contenuto }}
{% endfor %}
{% endif %}
It works ![]()
What I’d like though is that the image/images are printed in a specific part of the product description.
I was thinking of using some sort of “placeholder” in the product description and then use the replace filter to substitute with the code above, but so far I have come to no good…
Any suggestions? Am I over complicating it? ![]()