Hello Everyone, I am trying to access and loop through the collection list inside the blocks:
The following code should loop through this collection list
{% for block in section.blocks %}
{% case block.type %}
{% when 'Sub-Category' %}
{% if shop.locale == 'en' %}.subCategory::after{float: right}{% endif %}
Loop Throug The CollectionList {{ block.settings.sub-subcategory-collection_list }}
{% endcase %}
{% endfor %}
{% endif %}
The following is the schema I am trying to get the collection list from it:
{% schema %}
{
“name” : “Main Category”,
“settings” :
,
“blocks” :
[
{
“name” : “Sub-Category”,
“type” : “Sub-Category”,
“settings” :
[
{
“type”: “collection_list”,
“id”: “sub-subcategory-collection_list”,
“label”: “Sub Sub-Categories”
}
]
}
],
“presets” :
[
{
“name” : “Main Category”
}
]
}
{% endschema %}
Any one can help me to display all the collection in this collecion List
id:sub-subcategory-collection_list.
Thank you all…
Are you getting any output?
Will anything happen if you remove “.id” here
settings.sub_category_collection.id }}">
Hello Mr. @BaileyPaserk thank you for your time, I had adjust the code, I need to display the collections in the sub-subcategory-collection_list in the block section.
{% for block in section.blocks %}
{% case block.type %}
{% when 'Sub-Category' %}
Loop Throug The CollectionList {{ block.settings.sub-subcategory-collection_list }}
{% endcase %}
{% endfor %}
The following is the schema I am trying to get the collection list from it:
{% schema %}
{
"name" : "Main Category",
"settings" : [],
"blocks" :
[
{
"name" : "Sub-Category",
"type" : "Sub-Category",
"settings" :
[
{
"type": "collection_list",
"id": "sub-subcategory-collection_list",
"label": "Sub Sub-Categories"
}
]
}
],
"presets" :
[
{
"name" : "Main Category"
}
]
}
{% endschema %}