Skip to content

Instantly share code, notes, and snippets.

@ShayneP
Created January 10, 2020 16:19
Show Gist options
  • Save ShayneP/0c0b90b0a6c3b728975d733128266dca to your computer and use it in GitHub Desktop.
Save ShayneP/0c0b90b0a6c3b728975d733128266dca to your computer and use it in GitHub Desktop.
<h1>{{ section.settings.header }}</h1>
{%- assign count = section.settings.reviews_count | escape -%}
<ul>
{% for i in (1..count) %}
<li>Review number {{ forloop.index }}</li>
{% endfor %}
</ul>
{% schema %}
{
"name": {
"en": "Product review",
"fr": "Revues de produits"
},
"supports": ["product"],
"settings": [
{
"type": "text",
"id": "header",
"label": "Header",
"default": "Product reviews"
},
{
"type": "range",
"id": "reviews_count",
"label": "Reviews count",
"default": 4,
"min": 1,
"max": 10,
"step": 1
}
]
}
{% endschema %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment