Created
October 9, 2017 12:49
-
-
Save joe-dempsey/2f5a5dc85933294b28431e5360bb4dae to your computer and use it in GitHub Desktop.
FAQ's in shopify.
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
{% 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