mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Changed new content types to be part-free on creation
--HG-- branch : dev
This commit is contained in:
@@ -65,13 +65,7 @@ namespace Orchard.ContentTypes.Services {
|
|||||||
name = VersionName(name);
|
name = VersionName(name);
|
||||||
|
|
||||||
var contentTypeDefinition = new ContentTypeDefinition(name, typeViewModel.DisplayName);
|
var contentTypeDefinition = new ContentTypeDefinition(name, typeViewModel.DisplayName);
|
||||||
//just giving the new type some default parts for now
|
|
||||||
_contentDefinitionManager.StoreTypeDefinition(contentTypeDefinition);
|
_contentDefinitionManager.StoreTypeDefinition(contentTypeDefinition);
|
||||||
_contentDefinitionManager.AlterTypeDefinition(
|
|
||||||
contentTypeDefinition.Name,
|
|
||||||
cfg => cfg.WithPart("CommonAspect")
|
|
||||||
//.WithPart("RoutableAspect") //need to go the new routable route
|
|
||||||
.WithPart("BodyAspect"));
|
|
||||||
|
|
||||||
return new EditTypeViewModel(contentTypeDefinition);
|
return new EditTypeViewModel(contentTypeDefinition);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user