Skip to content

Instantly share code, notes, and snippets.

@joe-dempsey
Created October 9, 2017 12:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joe-dempsey/2f5a5dc85933294b28431e5360bb4dae to your computer and use it in GitHub Desktop.
Save joe-dempsey/2f5a5dc85933294b28431e5360bb4dae to your computer and use it in GitHub Desktop.
FAQ's in shopify.
{% comment %}
add assets in head and trigger in footer
page.faq needs {% section 'faq' %}
below is that section content.
{% endcomment %}
<div class="ui accordion">
{% for block in section.blocks %}
<div class="{% if forloop.first == true %}active{% endif %} title">
<i class="dropdown icon"></i>
{{ block.settings.heading }}
</div>
<div class="content {% if forloop.first == true %}active{% endif %}">
{{ block.settings.body }}
</div>
{% endfor %}
</div>
{% schema %}
{
"name": "faq'S",
"max_blocks": 100,
"class": "faqs",
"blocks": [
{
"type": "text",
"name": "Product feature",
"settings": [
{
"type": "text",
"id": "heading",
"label": "FAQ Heading"
},
{
"type": "textarea",
"id": "body",
"label": "FAQ answer"
}
]
}
]
}
{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment