FROM CACHE - en_header

Block Numbers in settings_data.json + How to quickly add blocks

DL7
Shopify Partner
10 0 2

Hi,

 

I'm trying to add more blocks into a section in my theme by way of editing the settings_data.json file.

What I notice when adding them is that the existing blocks have a number, as shown below. They seem rather random to me, with no order nor pattern.

 

So naturally, I attempted to add my own generic numbers to it, like 10000001, 10000002 etc, while maintaining the same json structure.

 

However, in doing so, the newly-added code in the json did not show up as blocks on my website. Can someone point out if adding blocks like this is possible? And what do the numbers mean, if they have any significance at all? 

 

How else can I quickly add a large number of blocks without having to painstakingly do it in the theme editor?

 

 

      "foo": {
        "type": "bar",
        "blocks": {
          "1569140983252-1": {
            "type": "quote",
            "settings": {
              "image": "shopifybarbar"
             }
            },
        "1569307563367": {
            "type": "quote",
            "settings": {
              "image": "shopifyfoofoo"
            }
         },

...
Replies 2 (2)
RebeccaN
New Member
1 0 0

Hi,

 

I'm new to Shopify, but you can try my suggestion below, and hopefully it helps you. 

 

I think adding blocks is possible ( i've done it ) but you will need to add you block numbers you created to the 'block-order', like the example below: 

 

"new-blocks-section": {

    "type": "new-blocks-template",

    "blocks": {

  --------all your blocks here -----------

},

 "block_order": [
            "1569140983252-1",
            "1569307563367",
          ],
 

 

Hope that works for you!

 

 

SKRASTS
Tourist
8 0 0

Thank you! Do you know if it matters what number we use for the blocks? Does it have to be a certain number of characters?