Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tim 45 posts 199 karma points
    Nov 20, 2020 @ 20:03
    Tim
    0

    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?

  • Marc Goodson 2157 posts 14434 karma points MVP 9x c-trib
    Nov 20, 2020 @ 20:06
    Marc Goodson
    100

    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

  • Tim 45 posts 199 karma points
    Nov 20, 2020 @ 21:26
    Tim
    0

    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 :)

  • Lucio 24 posts 142 karma points
    Nov 28, 2023 @ 14:58
    Lucio
    0

    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?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" button below.

    Continue discussion

Please Sign in or register to post replies