I need to get the list of images from my metafield(content type: collection list) in collection. I’m using this logic but it is not working…
Code snippet
{% assign top_collections = collection.metafields.custom.c-top-collections %}
{% if top_collections %}
<ul>
{% for collection in top_collections %}
<li>{{ collection.value }}</li>
{% endfor %}
</ul>
{% endif %}
Please, what is the correct form of doing this? Thank you.
2
Answers
Example solution here with some variables being pulled:
To get your array you need to write this
{{ collection.metafields.custom.c-top-collections.value }}