i have a .net user control to add some opinions nodes to umbraco content tree.In umbraco i have a Opinion document type and content page.I need to show this usercontrol in the page,until there i can do it,but i have to add an "Opinion Node" to umbraco content tree.How can i do that ? There is no any document for this,ive been searching it for 2 days.Thanks in advance
4
votes
1 Answers
9
votes
Document d = Document.MakeNew("New node name", DocumentType.GetByAlias("myDoctype"), User.GetCurrent(), parentNodeId);
Replace the parameters with appropriate values to create a new node called "New node name" of type "MyDoctype". If doing this through front-end (public-accessible) code, use the admin user by replacing User.GetCurrent()
with new User(-1)
.