mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-21 11:17:28 +08:00
Adding command to create a menu item.
Use the command in the default recipe files. Remove hardcoded home menu item creation from setup. --HG-- branch : recipe
This commit is contained in:
@@ -89,7 +89,7 @@ Modules are created by other users of Orchard just like you so if you feel up to
|
||||
_contentManager.Publish(page);
|
||||
}
|
||||
|
||||
Context.Output.WriteLine(T("Page Created successfully.").Text);
|
||||
Context.Output.WriteLine(T("Page created successfully.").Text);
|
||||
}
|
||||
}
|
||||
}
|
@@ -45,6 +45,7 @@
|
||||
<Command>
|
||||
feature enable Orchard.Experimental.TestingLists
|
||||
page create /Slug:"welcome-to-orchard" /Title:"Welcome to Orchard!" /Path:"welcome-to-orchard" /Homepage:true /Publish:true /UseWelcomeText:true
|
||||
menuitem create /MenuPosition:"1" /MenuText:"Home" /Url:"" /OnMainMenu:true
|
||||
</Command>
|
||||
|
||||
<Migration features="*" />
|
||||
|
@@ -41,6 +41,7 @@
|
||||
<Command>
|
||||
feature enable Orchard.Experimental.TestingLists
|
||||
page create /Slug:"welcome-to-orchard" /Title:"Welcome to Orchard!" /Path:"welcome-to-orchard" /Homepage:true /Publish:true /UseWelcomeText:true
|
||||
menuitem create /MenuPosition:"1" /MenuText:"Home" /Url:"" /OnMainMenu:true
|
||||
</Command>
|
||||
|
||||
<Migration features="*" />
|
||||
|
@@ -41,6 +41,7 @@
|
||||
<Command>
|
||||
feature enable Orchard.Experimental.TestingLists
|
||||
page create /Slug:"welcome-to-orchard" /Title:"Welcome to Orchard!" /Path:"welcome-to-orchard" /Homepage:true /Publish:true /UseWelcomeText:true
|
||||
menuitem create /MenuPosition:"1" /MenuText:"Home" /Url:"" /OnMainMenu:true
|
||||
</Command>
|
||||
|
||||
<Migration features="*" />
|
||||
|
@@ -270,13 +270,6 @@ namespace Orchard.Setup.Services {
|
||||
contentManager.Publish(tripelThird);
|
||||
}
|
||||
|
||||
// add a menu item for the shiny new home page
|
||||
var menuItem = contentManager.Create("MenuItem");
|
||||
menuItem.As<MenuPart>().MenuPosition = "1";
|
||||
menuItem.As<MenuPart>().MenuText = T("Home").ToString();
|
||||
menuItem.As<MenuPart>().OnMainMenu = true;
|
||||
menuItem.As<MenuItemPart>().Url = "";
|
||||
|
||||
//null check: temporary fix for running setup in command line
|
||||
if (HttpContext.Current != null) {
|
||||
authenticationService.SignIn(user, true);
|
||||
|
Reference in New Issue
Block a user