From fafb34f071f86c32e328a89860c968a01de8d2c5 Mon Sep 17 00:00:00 2001 From: Nathan Heskew Date: Thu, 14 Oct 2010 15:46:50 -0700 Subject: [PATCH] Changing around some default content created during setup --HG-- branch : dev --- .../Orchard.Setup/Services/SetupService.cs | 73 ++++++++----------- 1 file changed, 32 insertions(+), 41 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs b/src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs index 263f5c884..ed80805d2 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs +++ b/src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs @@ -221,48 +221,39 @@ namespace Orchard.Setup.Services { homepageLayer.As().Name = "TheHomepage"; homepageLayer.As().LayerRule = "url \"~/\""; contentManager.Publish(homepageLayer); + + // and three more for the tripel...really need this elsewhere... + var tripelFirst = contentManager.Create("HtmlWidget"); + tripelFirst.As().LayerPart = homepageLayer.As(); + tripelFirst.As().Title = T("First Leader Aside").Text; + tripelFirst.As().Zone = "TripelFirst"; + tripelFirst.As().Position = "5"; + tripelFirst.As().Text = "

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur a nibh ut tortor dapibus vestibulum. Aliquam vel sem nibh. Suspendisse vel condimentum tellus.

"; + tripelFirst.As().Owner = user; + contentManager.Publish(tripelFirst); + + var tripelSecond = contentManager.Create("HtmlWidget"); + tripelSecond.As().LayerPart = homepageLayer.As(); + tripelSecond.As().Title = T("Second Leader Aside").Text; + tripelSecond.As().Zone = "TripelSecond"; + tripelSecond.As().Position = "5"; + tripelSecond.As().Text = "

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur a nibh ut tortor dapibus vestibulum. Aliquam vel sem nibh. Suspendisse vel condimentum tellus.

"; + tripelSecond.As().Owner = user; + contentManager.Publish(tripelSecond); + + var tripelThird = contentManager.Create("HtmlWidget"); + tripelThird.As().LayerPart = homepageLayer.As(); + tripelThird.As().Title = T("Third Leader Aside").Text; + tripelThird.As().Zone = "TripelThird"; + tripelThird.As().Position = "5"; + tripelThird.As().Text = "

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur a nibh ut tortor dapibus vestibulum. Aliquam vel sem nibh. Suspendisse vel condimentum tellus.

"; + tripelThird.As().Owner = user; + contentManager.Publish(tripelThird); - // create an html widget with the homepage layer as its container - var htmlWidget = contentManager.Create("HtmlWidget"); - htmlWidget.As().LayerPart = homepageLayer.As(); - htmlWidget.As().Title = T("Welcome to Orchard!").Text; - htmlWidget.As().Zone = "Content"; - htmlWidget.As().Position = "5"; - htmlWidget.As().Text = "

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.

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

"; - htmlWidget.As().Owner = user; - contentManager.Publish(htmlWidget); - - // and three more for the third aside...really need this elsewhere... - var asideHtmlWidget1 = contentManager.Create("HtmlWidget"); - asideHtmlWidget1.As().LayerPart = homepageLayer.As(); - asideHtmlWidget1.As().Title = T("First Leader Aside").Text; - asideHtmlWidget1.As().Zone = "AsideThird"; - asideHtmlWidget1.As().Position = "4"; - asideHtmlWidget1.As().Text = "

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur a nibh ut tortor dapibus vestibulum. Aliquam vel sem nibh. Suspendisse vel condimentum tellus.

"; - asideHtmlWidget1.As().Owner = user; - contentManager.Publish(asideHtmlWidget1); - - var asideHtmlWidget2 = contentManager.Create("HtmlWidget"); - asideHtmlWidget2.As().LayerPart = homepageLayer.As(); - asideHtmlWidget2.As().Title = T("Second Leader Aside").Text; - asideHtmlWidget2.As().Zone = "AsideThird"; - asideHtmlWidget2.As().Position = "5"; - asideHtmlWidget2.As().Text = "

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur a nibh ut tortor dapibus vestibulum. Aliquam vel sem nibh. Suspendisse vel condimentum tellus.

"; - asideHtmlWidget2.As().Owner = user; - contentManager.Publish(asideHtmlWidget2); - - var asideHtmlWidget3 = contentManager.Create("HtmlWidget"); - asideHtmlWidget3.As().LayerPart = homepageLayer.As(); - asideHtmlWidget3.As().Title = T("Third Leader Aside").Text; - asideHtmlWidget3.As().Zone = "AsideThird"; - asideHtmlWidget3.As().Position = "6"; - asideHtmlWidget3.As().Text = "

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur a nibh ut tortor dapibus vestibulum. Aliquam vel sem nibh. Suspendisse vel condimentum tellus.

"; - asideHtmlWidget3.As().Owner = user; - contentManager.Publish(asideHtmlWidget3); - - // create the home page as a WidgetPage - var page = contentManager.Create("WidgetPage", VersionOptions.Draft); - page.As().Title = T("Home").ToString(); + // create a welcome page that's promoted to the home page + var page = contentManager.Create("Page"); + page.As().Title = T("Welcome to Orchard!").Text; + page.As().Text = "

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.

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().Owner = user; contentManager.Publish(page); siteSettings.Record.HomePage = "RoutableHomePageProvider;" + page.Id;