Last active
June 22, 2022 05:11
-
-
Save hezninja/85bad967605890a0ce2a2b7c7cc30a97 to your computer and use it in GitHub Desktop.
Shopify Single Line Text (List) Iteration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Probably a bit hacky and i've overlooked an easier solution... | |
But for some reason looping through a "Single line text (List)" type metafield is problematic. | |
At least for me. | |
--> | |
{% assign singleLineList = product.metafields.custom.exampleList | replace:'"','' | replace:'[','' | replace:']','' | split: ',' %} | |
{% for listItem in singleLineList %} | |
<!-- Do stuff --> | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment