Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi
I want to manipulate a Document in runtime and need to add some children to the same. Is there any API exist to add children at run time to a Document
Regards
Arun
Sure, there is an class name as "Document" in the API, and it has a static method "MakeNew, you can use this method.
When you try to create a new document, you need to pass in parent id for new document.
Here is some sample code:
var partentDocumentID = 1000;
var child = Document.MakeNew("Name", DocumentType, User, partentDocumentID);
child.Save()
+1. Check out this wiki for more info: http://our.umbraco.org/wiki/reference/api-cheatsheet/creating-a-document
-Tom
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Adding Children for a Document
Hi
I want to manipulate a Document in runtime and need to add some children to the same. Is there any API exist to add children at run time to a Document
Regards
Arun
Sure, there is an class name as "Document" in the API, and it has a static method "MakeNew, you can use this method.
When you try to create a new document, you need to pass in parent id for new document.
Here is some sample code:
var partentDocumentID = 1000;
var child = Document.MakeNew("Name", DocumentType, User, partentDocumentID);
child.Save()
+1. Check out this wiki for more info: http://our.umbraco.org/wiki/reference/api-cheatsheet/creating-a-document
-Tom
is working on a reply...