How can I duplicate a block while retaining the same settings in theme customization?

How can I duplicate a block while retaining the same settings in theme customization?

Dixor
Shopify Partner
32 3 13

In theme customization if there any way how we can duplicate block?

I have a block with 100+ settings... font size, color. border radius, etc etc...

I fill bad when i need 15+ blocks... And there is no way how i can duplicate it... With just simply change the text in it... but keep styles...

220903222628.png

Dixor_0-1662233454858.png

 

Replies 2 (2)

made4Uo
Shopify Partner
3874 718 1226

Hi @Dixor,

 

If you are talking about the JSON blocks, then yes you can.  You have to be knowledgeable with JSON though to execute this properly.

 

1. Go to Section file where you have the block code.

2. Go down to schema, and highlight from "blocks": [....  to the end bracket of the blocks. 

made4Uo_0-1662244168287.png

 

How to find the closing ] of the blocks? If you click the opening [, the bracket should be highlighted together with the closing bracket. 

 

3. Copy the highlighted block code, then open the file where you want to add this block settings. 

Paste the code where inside the schema. You might have to adjust the block schema depending on the current file you are adding it to. 

 

You can use this schema validator if you are showing some errors.

 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free
Dixor
Shopify Partner
32 3 13

Yes, this was my first idea. But this question comes from my client...