Changing the slug of the "Home" page created during setup

- Changed the "Home" page slug from "" to "home"
- Changed the page slug constraint to not need to deal with a null value (i.e. an empty slug is no longer valid for a page - not necessary now that any page can be made *the* homepage)

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-02-25 23:37:54 -08:00
parent 914e7f91be
commit a224d4d294
2 changed files with 1 additions and 4 deletions

View File

@@ -42,9 +42,6 @@ namespace Orchard.Pages.Services {
public string LookupPublishedSlug(string slug) {
lock (_syncLock) {
if (slug == null)
return "";
string actual;
if (_currentlyPublishedSlugs.TryGetValue(slug, out actual))
return actual;

View File

@@ -104,7 +104,7 @@ namespace Orchard.Setup.Controllers {
// create home page as a CMS page
var page = contentManager.Create("page");
page.As<BodyAspect>().Text = "<p>Welcome to Orchard!</p><p>Congratulations, you've successfully set-up your Orchard site.</p><p>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.</p><p>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.</p><p>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.</p><p>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 Navigation]. You can also click [Add New Blog] and start posting by clicking [Add New Post].</p><p>Finally, Orchard has been designed to be extended. It comes with a few built-in modules such as pages and blogs but you can install new ones 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].</p><p>--The Orchard Crew</p>";
page.As<RoutableAspect>().Slug = "";
page.As<RoutableAspect>().Slug = "home";
page.As<RoutableAspect>().Title = T("Home").ToString();
page.As<HasComments>().CommentsShown = false;
page.As<CommonAspect>().Owner = user;