4
votes

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

1
Can you reword your question as it is a little unclear what you need. Do you want to know how to add a node into the content tree programmatically?Digbyswift

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