Skip to content

Instantly share code, notes, and snippets.

@projoomexperts
Created May 23, 2017 16:31
Show Gist options
  • Save projoomexperts/03939274161fba5d6d146a5194db86f3 to your computer and use it in GitHub Desktop.
Save projoomexperts/03939274161fba5d6d146a5194db86f3 to your computer and use it in GitHub Desktop.
{% if section.blocks.size > 0 %}
<div class="index-section">
<div class="collections" id="collections--{{ section.id }}" data-section-id="{{ section.id }}" data-section-type="collections-section">
<ul class="collection-grid">
{% for block in section.blocks %}
{% if block.settings.image != blank %}
<li id="collection--{{ block.id }}">
<a href="{{ block.settings.link }}">
{{ block.settings.image | img_url: '2048x' | img_tag: block.settings.image.alt }}
</a>
</li>
{% else %}
{% endif %}
{% endfor %}
</ul>
</div>
</div>
{% endif %}
{% schema %}
{
"name": "Collection Item List",
"max_blocks": 12,
"settings": [],
"blocks": [
{
"type": "image",
"name": "Collection Item",
"settings": [
{
"type": "image_picker",
"id": "image",
"label": "Image"
},
{
"type": "url",
"id": "link",
"label": "Link URL"
}
]
}
],
"presets": [
{
"name": "Collection Item List",
"category": "Collection",
"blocks": [
{
"type": "image"
},
{
"type": "image"
}
]
}
]
}
{% endschema %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment