mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-21 19:34:40 +08:00
Disabling the Orchard.Pages module by default and adjusted the page content type configured during setup to be a page-like content type.
- also added a RoutableHomePageProvider to support a routable item as the home page --HG-- branch : dev
This commit is contained in:
@@ -83,7 +83,6 @@ namespace Orchard.Setup.Services {
|
||||
"TinyMce",
|
||||
"Orchard.Modules",
|
||||
"Orchard.Themes",
|
||||
"Orchard.Pages",
|
||||
"Orchard.Blogs",
|
||||
"Orchard.Comments",
|
||||
"Orchard.Tags",
|
||||
@@ -181,7 +180,7 @@ namespace Orchard.Setup.Services {
|
||||
|
||||
var contentDefinitionManager = environment.Resolve<IContentDefinitionManager>();
|
||||
contentDefinitionManager.AlterTypeDefinition("BlogPost", cfg => cfg.DisplayedAs("Blog Post").WithPart("HasComments").WithPart("HasTags").WithPart("Localized").Indexed());
|
||||
contentDefinitionManager.AlterTypeDefinition("Page", cfg => cfg.DisplayedAs("Page").WithPart("HasComments").WithPart("HasTags").WithPart("Localized").Indexed());
|
||||
contentDefinitionManager.AlterTypeDefinition("Page", cfg => cfg.DisplayedAs("Page").WithPart("CommonAspect").WithPart("IsRoutable").WithPart("BodyAspect").WithPart("HasComments").WithPart("HasTags").WithPart("Localized").Indexed());
|
||||
contentDefinitionManager.AlterTypeDefinition("SandboxPage", cfg => cfg.DisplayedAs("Sandbox Page").WithPart("HasComments").WithPart("HasTags").WithPart("Localized").Indexed());
|
||||
contentDefinitionManager.AlterPartDefinition("BodyAspect", cfg => cfg.WithSetting("BodyPartSettings.FlavorDefault", BodyPartSettings.FlavorDefaultDefault));
|
||||
|
||||
@@ -195,7 +194,7 @@ namespace Orchard.Setup.Services {
|
||||
page.As<HasComments>().CommentsShown = false;
|
||||
}
|
||||
contentManager.Publish(page);
|
||||
siteSettings.Record.HomePage = "PageHomePageProvider;" + page.Id;
|
||||
siteSettings.Record.HomePage = "RoutableHomePageProvider;" + page.Id;
|
||||
|
||||
// add a menu item for the shiny new home page
|
||||
var menuItem = contentManager.Create("MenuItem");
|
||||
|
Reference in New Issue
Block a user