Hi,
I am currently trying to batch import some data from JSON and programmatically create content from it. (Using Umbraco 13)
My problem is that I have a document type which uses a Content Template (not a template view) which contains a blocklist with default components and properties set for each new content created.
How do I create new content with this Content Template programmatically? I have looked on the forum and documentation and can't seem to find anything about it.
Thanks in advance!
accele
12/31/2023, 1:06 AM
I've just found this in the docs: CreateContentFromBlueprint(IContent, String, Int32)
Will experiment with this for now. Any additional information that my be helpful would be appreciated, thanks 🙂
accele
12/31/2023, 1:11 AM
How will I search the content to find the blueprint content type to pass in as IContent?
accele
12/31/2023, 1:43 AM
ContentService.GetBlueprintById(blueprintId) ;
accele
12/31/2023, 1:44 AM
Blueprint ID is in the backoffice blueprint (Content Template) URL 👍