Setting Content Template (not view template) while...
# help-with-umbraco
a
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!
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 🙂
How will I search the content to find the blueprint content type to pass in as IContent?
ContentService.GetBlueprintById(blueprintId) ;
Blueprint ID is in the backoffice blueprint (Content Template) URL 👍
4 Views