Reputation: 963
I'm using Umbraco 5. Is it possible to create new Document Type programmatically using Umbraco API? Thanks.
Upvotes: 0
Views: 1314
Reputation: 18
You can take a look at uSiteBuilder http://usitebuilder.vegaitsourcing.rs/.
It let's you create and update document types with simple POCO classes using attributes.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Vega.USiteBuilder;
namespace MySite.DocumentTypes {
[DocumentType(AllowedTemplates = new string[] { "MyTemplateAlias" },
IconUrl = "doc4.gif", Thumbnail = "docWithImage.png",
AllowedChildNodeTypes = new Type[] { typeof(MySite.DocumentTypes.ContentPage) })
]
public class HomePage : MySite.DocumentTypes.PageBase {
}
}
Upvotes: 0
Reputation: 26
There is a project called Umbraco.Cms.Packages.DevDataset in Umbraco 5 source code that has the way to create documment type, template, content node data etc.
You should definitely have a look :)
Upvotes: 1