I'm trying to import some content into a site that uses content blocks, but I'm struggling to figure out how to programatically create new content blocks and add them to my pages using the content service.
I am trying to do the same with an Umbraco 12 version and it seems that this is no longer working.
Is there any place where I can find the updated way to create block list items programmatically?
Programatically adding block list items
I'm trying to import some content into a site that uses content blocks, but I'm struggling to figure out how to programatically create new content blocks and add them to my pages using the content service.
Has anyone managed to do this?
Hi Tim
There is some 'work in progress' documentation for doing that on the Umbraco Docs repo:
https://github.com/umbraco/UmbracoDocs/blob/e64ec0e5b28b4e5a37b7865691621e45dd82701f/Getting-Started/Backoffice/Property-Editors/Built-in-Property-Editors/Block-List-Editor/index.md
If you scroll down to the bottom, that might give you the right steer?
regards
marc
Thanks Marc, that's EXACTLY what I was after! I couldn't work out how I got the UDIs, but that explains it perfectly. Thank you :)
I am trying to do the same with an Umbraco 12 version and it seems that this is no longer working. Is there any place where I can find the updated way to create block list items programmatically?
is working on a reply...