How to Define Block Type Schema?

dwightco
Excursionist
21 0 2

I'm a bit confused on block type schema...

Do they work similarly to "types" in settings such as "image_picker" or "checkbox" where a type means that there's a preset format?

If I do something like:

"blocks": [
    {
      "type": "reward",
      "name": "Reward",
      "settings": [


Does "type": "reward", actually do anything? Is there a list of preset block types? Or do I have the define block types in settings_data.json? And if I do, how should I go about defining them?

Thank you!

Replies 3 (3)

Hardik29418
Shopify Partner
2858 407 1073
"blocks": [
      {
        "type": "quote",
        "name": "Quote",
        "settings": [
          {
            "id": "content",
            "type": "text",
            "label": "Quote"
          }
        ]
      }
]

- Need a Shopify developer? Chat on WhatsApp or EMAIL ME!


- Your Coffee Tip would do Magic code ❤️
- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
- Email
dwightco
Excursionist
21 0 2

Hi, thanks for your answer, but that wasn't my question!

I would like to clarify a bit: what I'm wondering about is this particular line:

"type": "quote",

 

When "type" is used in a block, are the type presets that I'm trying to create? Where is the "quote" type defined? What is the purpose of defining a block type?

Hardik29418
Shopify Partner
2858 407 1073

There are several types like radio, checkbox, textarea, richtext where admin can customize from theme customization

- Need a Shopify developer? Chat on WhatsApp or EMAIL ME!


- Your Coffee Tip would do Magic code ❤️
- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
- Email