Converting from Kirbybuilder blocks to "core" blocks

Hey,

i just want to replace the kirby builder plugin with the core blocks.
i already changed the yaml data and the stuff is working in the backend as expected. The only problem is that my old(kirbybuilder) content files differ from the new content files.
Example:

Old:

Title: testpage

----

Modules:

- 
  footersnippetheadline: Just take my money!
  footersnippetsubheadline: 'Hold on, we have a free plan, you don’t even have to pay. <br> We’d appreciate it a lot, tho!'
  footersnippetbuttontext: I love free stuff
  footersnippetbuttonurl: https://app.typestudio.co/
  _key: landingpage__cta_footer
  _uid: >
    landingpage__cta_footer_1612317017496_595

----

new:

Title: modula

----

Text: [{"content":{"footersnippetheadline":"Testheadline","footersnippetsubheadline":"Testsubheadline","footersnippetbuttontext":"testbuttontext","footersnippetbuttonurl":"testurl"},"id":"9c74dbe0-9d46-4dd2-8d0f-f910336c622a","isHidden":false,"type":"cta__footer"}]

----

is there any way to kind of convert them? Or do i have to copy all the content from my old blocks inside the new blocks by hand?

Best
Marvin

You could do it programmatically, see this recipe: Quicktip: Add blocks to a blocks field programmatically | Kirby

Thanks for your answer :slight_smile:

but in the end i have to copy every content from the old block at least once, right?
I don’t know i have understand it right how that would help in my case.

Unless I’m missing something, there is no way to convert from those pagebuilder fields directly, because depending on their structure, you would have to somehow translate this into the new blocks (and maybe even create new block types).

I.e. is your footersnippetheadline a h block and if so, what level etc.

In the end it would be custom block to custom block with exactly the same namings and stuff…

But thank you :blush:

I actually found the solution: Blocks | Kirby

i don’t know why but somehow i have overlooked this section all the time…

2 Likes