Presets Invalid attribute

Solved
Tourist
9 1 0

I'm having an issue with a section I'm trying to build out for a client. I need to add a section to the homepage that uses blocks but for some reason I keep getting a json error "invalid schema: "type" is not a valid attribute and invalid block 'select': 'presets' is not a valid attribute.

Here is my schema. I've tried everything I could find and nothing seems to be working.

 

{% schema %}
{
"name": "Image Links",
"type": "link_details",
"max_blocks": 3,
"blocks": [
{
"type": "select",
"name": "Image Links",
"settings": [
{
"id": "link_pic",
"type": "image_picker",
"label": "Link Background"
},
{
"id": "link_txt_top",
"type": "text",
"label": "Top Text"
},
{
"id": "link_txt_bottom",
"type": "text",
"label": "Bottom Text"
},
{
"id": "page_link",
"type": "url",
"label": "link"
}
],
"presets": [
{
"name": "Custom Image Links",
"category": "Custom Link Content",
"blocks": [
{
"type": "link_details"
},
{
"type": "link_details"
}
]
}
]
}
]
}
{% endschema %}

0 Likes

Success.

Shopify Expert
51 12 7

Hey kemmieg,

 

The "type" attribute should be used inside of a block or to define a setting type. Try the following in place of your current schema:

 

{% schema %}
  {
      "name": "Image Links",
      "max_blocks": 3,
      "blocks": [{
          "type": "link_details",
          "name": "Image Links",
          "settings": [{
                  "id": "link_pic",
                  "type": "image_picker",
                  "label": "Link Background"
              },
              {
                  "id": "link_txt_top",
                  "type": "text",
                  "label": "Top Text"
              },
              {
                  "id": "link_txt_bottom",
                  "type": "text",
                  "label": "Bottom Text"
              },
              {
                  "id": "page_link",
                  "type": "url",
                  "label": "link"
              }
          ]
      }],
      "presets": [{
          "name": "Custom Image Links",
          "category": "Custom Link Content",
          "blocks": [{
                  "type": "link_details"
              },
              {
                  "type": "link_details"
              }
          ]
      }]
  }
{% endschema %}

 

0 Likes

Success.

Tourist
9 1 0

Thank you that worked Beautifully.

0 Likes
Highlighted
Shopify Expert
51 12 7
Great to hear, please mark my previous post as the accepted solution. Thanks!
0 Likes