Skip to content

Instantly share code, notes, and snippets.

@khoipro
Created May 17, 2018 05:19
Show Gist options
  • Select an option

  • Save khoipro/0131d94ba3a35bdacc79730ef607fc92 to your computer and use it in GitHub Desktop.

Select an option

Save khoipro/0131d94ba3a35bdacc79730ef607fc92 to your computer and use it in GitHub Desktop.
{% comment %}
If you have multiple product fields, for example:
blog.settings.product_1
blog.settings.product_2
blog.settings.product_3
{% endcomment %}
{% assign product_handle = '' %}
{% for i in (1..5) %}
{% assign product_handle = 'blog.settings.product_' | append: i %}
{% assign product = all_products[product_handle] %}
{% endfor %}
@starkkey
Copy link

starkkey commented Feb 7, 2023

Does this goes for all ? like an example to display multiple metafield to display

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment