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
can i create a new document type programmatically ??
Hi Ahmed,
you can! The code will be something like this, depending on the Umbraco version you're working with:
// Umbraco 4 DocumentType dt = DocumentType.MakeNew(new umbraco.BusinessLogic.User(0), "My New DocumentType"); dt.Save(); // Umbraco 6 var cs = ApplicationContext.Current.Services.ContentTypeService;ContentType ct = new ContentType(-1); ct.Name = "My New v6 DocType"; ct.Alias = "myNewV6Doctype";cs.Save(ct);
About the Umbraco 6-code I'm not 100 percent sure, but it's something like that.
Cheers, Jeffrey
thanks Jeffery
i am using v 6.0 and the code you wrote helped very much
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
programmatically creating a document type
can i create a new document type programmatically ??
Hi Ahmed,
you can! The code will be something like this, depending on the Umbraco version you're working with:
About the Umbraco 6-code I'm not 100 percent sure, but it's something like that.
Cheers, Jeffrey
thanks Jeffery
i am using v 6.0 and the code you wrote helped very much
is working on a reply...