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:
Nathan Heskew
2010-07-13 17:19:08 -07:00
parent 5bf2be1e19
commit 4c7973e2ce
2 changed files with 46 additions and 3 deletions

View File

@@ -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");