Hi,
I am using the Dawn theme and trying to add in the logo list to the footer of me site. .
Whenever I copy the code snippet and save, I receive following error -
Invalid preset - cannot include blocks in preset because there are no blocks defined.
I have tried codes from multiple sources and receive the same error, can anyone assist?
This issue is in schema in bottom. Add blocks in code for schema
This is my code
.logo-bar__item {
display: inline-block;
max-width: {{ section.settings.logo_width }};
}
{{ section.settings.title | escape }}
{%- if section.blocks.size > 0 -%}
{%- endif -%}
{% schema %}
{
“name”: “Logo list”,
“class”: “index-section”,
“max_blocks”: 10,
“settings”: [
{
“type”: “text”,
“id”: “title”,
“label”: “Heading”,
“default”: “Logo list”
},
{
“type”: “select”,
“id”: “logo_width”,
“label”: “Logo width”,
“default”: “160px”,
“options”: [
{
“label”: “Extra Small”,
“value”: “100px”
},
{
“label”: “Small”,
“value”: “125px”
},
{
“label”: “Medium”,
“value”: “160px”
},
{
“label”: “Large”,
“value”: “175px”
},
{
“label”: “Extra Large”,
“value”: “200px”
}
]
}
],
“blocks”: [
{
“type”: “logo_image”,
“name”: “Logo”,
“settings”: [
{
“type”: “image_picker”,
“id”: “image”,
“label”: “Image”
},
{
“type”: “url”,
“id”: “link”,
“label”: “Link”,
“info”: “Optional”
}
]
}
],
“presets”: [
{
“name”: “Logo list”,
“category”: “Image”,
“blocks”: [
{
“type”: “logo_image”
},
{
“type”: “logo_image”
},
{
“type”: “logo_image”
},
{
“type”: “logo_image”
}
]
}
]
}
{% endschema %}
htea
June 26, 2023, 7:46pm
5
This is a Shopify issue, not an issue with your code. It’s happening to me on all themes even though I know the code is fine. You should write to them to make them aware that a lot of people are experiencing this problem.
1 Like
I got it to work but now the images won’t show