From f22cd057ba7aa84406ebc2feeb52d12ee24d5f49 Mon Sep 17 00:00:00 2001 From: Erik Porter Date: Wed, 3 Mar 2010 13:21:39 -0800 Subject: [PATCH] Fixed a setup hack --HG-- branch : dev --- .../Modules/Orchard.Setup/Controllers/SetupController.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs b/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs index d73b0f88b..ce6d56d6a 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs +++ b/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs @@ -103,14 +103,12 @@ namespace Orchard.Setup.Controllers { var contentManager = finiteEnvironment.Resolve(); // create home page as a CMS page - var page = contentManager.Create("page"); + var page = contentManager.Create("page", VersionOptions.Draft); page.As().Text = "

Welcome to Orchard!

Congratulations, you've successfully set-up your Orchard site.

This is the home page of your new site. We've taken the liberty to write here about a few things you could look at next in order to get familiar with the application. Once you feel confident you don't need this anymore, just click Edit to go into edit mode and replace this with whatever you want on your home page to make it your own.

One thing you could do (but you don't have to) is go into Manage Settings (follow the Admin link and then look for it under \"Settings\" in the menu on the left) and check that everything is configured the way you want.

You probably want to make the site your own. One of the ways you can do that is by clicking Manage Themes in the admin menu. A theme is a packaged look and feel that affects the whole site. We have installed a few themes already, but you'll also be able to browse through an online gallery of themes created by other users of Orchard.

Next, you can start playing with the content types that we installed. For example, go ahead and click Add New Page in the admin menu and create an \"about\" page. Then, add it to the navigation menu by going to Manage Menu. You can also click Add New Blog and start posting by clicking \"Add New Post\".

Finally, Orchard has been designed to be extended. It comes with a few built-in modules such as pages and blogs or themes. You can install new themes by going to Manage Themes and clicking Install a new Theme. Like for themes, modules are created by other users of Orchard just like you so if you feel up to it, please consider participating.

--The Orchard Crew

"; page.As().Slug = "home"; page.As().Title = T("Home").ToString(); page.As().CommentsShown = false; page.As().Owner = user; - //HACK: (erikpo) Since content items are published by default they don't get a chance for handlers to fire to setup default values which blog up other pages in the system. Figure out what they are published by default and change - page.VersionRecord.Published = false; contentManager.Publish(page); siteSettings.Record.HomePage = "PageHomePageProvider;" + page.Id;