Closed AndersBrohus closed 3 years ago
Technically, sure. There are no APIs in our package to create blocks, but you can use Umbraco's IContentService
and use SetValue()
to set a ContentBlocks property value yourself. The structure is something like this. Main thing is generating that "Nested Content data" part of the JSON somehow.
{
"version": 2,
"header": {
"id": "...",
"definitionId": "...",
"layoutId": "...",
"presetId": null,
"isDisabled": false,
"content": [{ /* Nested Content data */ }]
},
"blocks": [
/* Same format as header */
]
}
Arh okay, thanks alot :)
Will try and see how i can do that :)
Should we change the issue to just insert this in the "documentation"? :)
Added a section about this to the readme.
Hi :)
Is it possible to add content programatically? Currently have an old website with alot of older nodes which has to be imported and if possible setup using one block of the blocks that are available :)