mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing how the default home page is configured during setup
--HG-- branch : dev
This commit is contained in:
@@ -246,13 +246,13 @@ namespace Orchard.Setup.Services {
|
||||
layerInitializer.CreateDefaultLayers();
|
||||
|
||||
// add a layer for the homepage
|
||||
var homepageLayer = contentManager.Create("Layer");
|
||||
var homepageLayer = contentManager.Create("Layer", VersionOptions.Draft);
|
||||
homepageLayer.As<LayerPart>().Name = "TheHomepage";
|
||||
homepageLayer.As<LayerPart>().LayerRule = "url \"~/\"";
|
||||
contentManager.Publish(homepageLayer);
|
||||
|
||||
// and three more for the tripel...really need this elsewhere...
|
||||
var tripelFirst = contentManager.Create("HtmlWidget");
|
||||
var tripelFirst = contentManager.Create("HtmlWidget", VersionOptions.Draft);
|
||||
tripelFirst.As<WidgetPart>().LayerPart = homepageLayer.As<LayerPart>();
|
||||
tripelFirst.As<WidgetPart>().Title = T("First Leader Aside").Text;
|
||||
tripelFirst.As<WidgetPart>().Zone = "TripelFirst";
|
||||
@@ -260,7 +260,7 @@ namespace Orchard.Setup.Services {
|
||||
tripelFirst.As<BodyPart>().Text = "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur a nibh ut tortor dapibus vestibulum. Aliquam vel sem nibh. Suspendisse vel condimentum tellus.</p>";
|
||||
contentManager.Publish(tripelFirst);
|
||||
|
||||
var tripelSecond = contentManager.Create("HtmlWidget");
|
||||
var tripelSecond = contentManager.Create("HtmlWidget", VersionOptions.Draft);
|
||||
tripelSecond.As<WidgetPart>().LayerPart = homepageLayer.As<LayerPart>();
|
||||
tripelSecond.As<WidgetPart>().Title = T("Second Leader Aside").Text;
|
||||
tripelSecond.As<WidgetPart>().Zone = "TripelSecond";
|
||||
@@ -268,7 +268,7 @@ namespace Orchard.Setup.Services {
|
||||
tripelSecond.As<BodyPart>().Text = "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur a nibh ut tortor dapibus vestibulum. Aliquam vel sem nibh. Suspendisse vel condimentum tellus.</p>";
|
||||
contentManager.Publish(tripelSecond);
|
||||
|
||||
var tripelThird = contentManager.Create("HtmlWidget");
|
||||
var tripelThird = contentManager.Create("HtmlWidget", VersionOptions.Draft);
|
||||
tripelThird.As<WidgetPart>().LayerPart = homepageLayer.As<LayerPart>();
|
||||
tripelThird.As<WidgetPart>().Title = T("Third Leader Aside").Text;
|
||||
tripelThird.As<WidgetPart>().Zone = "TripelThird";
|
||||
@@ -278,8 +278,10 @@ namespace Orchard.Setup.Services {
|
||||
}
|
||||
|
||||
// create a welcome page that's promoted to the home page
|
||||
var page = contentManager.Create("Page");
|
||||
var page = contentManager.Create("Page", VersionOptions.Draft);
|
||||
page.As<RoutePart>().Title = T("Welcome to Orchard!").Text;
|
||||
page.As<RoutePart>().Path = "";
|
||||
page.As<RoutePart>().Slug = "";
|
||||
page.As<BodyPart>().Text = string.Format(CultureInfo.CurrentCulture, "<p>You’ve successfully setup your Orchard Site and this is the homepage of your new site. Here are a few things you can look at to get familiar with the application. Once you feel confident you don’t need this anymore, you can <a href=\"Admin/Contents/Edit/{0}\">remove this by going into editing mode</a> and replacing it with whatever you want.</p><p>First things first - You’ll probably want to <a href=\"Admin/Settings\">manage your settings</a> and configure Orchard to your liking. After that, you can head over to <a href=\"Admin/Themes\">manage themes to change or install new themes</a> and really make it your own. Once you’re happy with a look and feel, it’s time for some content. You can start creating new custom content types or start with some built-in ones by <a href=\"Admin/Pages/Create\">adding a page</a>, <a href=\"Admin/Blogs/Create\">creating a blog</a> or <a href=\"Admin/Navigation\">managing your menus.</a></p><p>Finally, Orchard has been designed to be extended. It comes with a few built-in modules such as pages and blogs or themes. If you’re looking to add additional functionality, you can do so by creating your own module or installing a new one that someone has made. Modules are created by other users of Orchard just like you so if you feel up to it, <a href=\"http://www.orchardproject.net/\">please consider participating</a>. XOXO – The Orchard Team </p>", page.Id);
|
||||
|
||||
contentManager.Publish(page);
|
||||
|
Reference in New Issue
Block a user