Hi everyone, I’m pretty new to liquid and I’ve been trying to create a section that takes a collection inside of a block, then displays a number of those products in that section. I am struggling to get any actual output and I’m not sure why.
The end result of this should be a section that has multiple tabs. Each tab is a different collection and when the user clicks on the tab it will show a few of those collection’s products. So something like this:
Collection 1 | Collection 2 | Collection 3 |
---|---|---|
Collection 1 - Product 1 | Collection 1 - Product 2 | Collection 1 - Product 3 |
My code so far:
{% for collection in section.blocks %}
{{collection.products}}
{% endfor %}
{% schema %}
{
"blocks":[
{
"type":"Collection",
"name":"Tabbed Collection",
"settings": [
{
"type": "collection",
"id": "feature_collection",
"label": "Featured Collection"
}
]
}
],
"presets":[{
"category":"Custom Content",
"name":"tabbed collection"
}]
}
{% endschema %}