Hello,
I want to display add faq section on each collection page where admin can add faq’s dynamically.
so i have added below code. now code is working correctly i am able to add faq from backend on collection page, but same faqs data display on all collection pages. every collection page has a diffrent faq data . eg veliche page valiche faq, sparta page sparta faq.
{% schema %}
{
"name": "FAQ",
"settings": [],
"blocks": [
{
"type": "content",
"name": "Custom content",
"settings": [
{
"type": "html",
"id": "content",
"label": "Content",
"info": "Allow html code"
}
]
},
{
"type": "accordion",
"name": "Accordion item",
"settings": [
{
"type": "textarea",
"id": "title",
"label": "Heading",
"default": "Question Name"
},
{
"type": "richtext",
"id": "content",
"label": "Content",
"default": "
Answer Content
"
},
{
"type": "checkbox",
"id": "open",
"label": "Open Tab By Default",
"default": false
}
]
}
],
"presets": [
{
"name": "FAQs",
"blocks": [
{
"type": "accordion"
},
{
"type": "accordion"
},
{
"type": "accordion"
},
{
"type": "accordion"
}
]
}
]
}
{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}