mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Getting the main menu rendering again (from a fresh setup)
--HG-- branch : theming
This commit is contained in:
@@ -2,8 +2,16 @@
|
|||||||
// odd formatting in this file is to cause more attractive results in the output.
|
// odd formatting in this file is to cause more attractive results in the output.
|
||||||
var items = (IEnumerable<dynamic>)Enumerable.Cast<dynamic>(Model);
|
var items = (IEnumerable<dynamic>)Enumerable.Cast<dynamic>(Model);
|
||||||
}
|
}
|
||||||
<li><a href="@Model.Href">@Model.Text</a>@{ if (items.Any()) {
|
@{
|
||||||
<ul>
|
if (string.IsNullOrWhiteSpace((string)Model.Text)) {
|
||||||
@foreach(var item in Model) {@Display(item);}
|
foreach(var item in Model) {@Display(item);}
|
||||||
</ul>}}
|
} else {
|
||||||
</li>
|
<li><a href="@Model.Href">@Model.Text</a>
|
||||||
|
@if (items.Any()) {
|
||||||
|
<ul>
|
||||||
|
@foreach(var item in Model) {@Display(item);}
|
||||||
|
</ul>
|
||||||
|
}
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
}
|
@@ -6,6 +6,7 @@ using Orchard.ContentManagement.MetaData;
|
|||||||
using Orchard.Core.Common.Models;
|
using Orchard.Core.Common.Models;
|
||||||
using Orchard.Core.Common.Settings;
|
using Orchard.Core.Common.Settings;
|
||||||
using Orchard.Core.Contents.Extensions;
|
using Orchard.Core.Contents.Extensions;
|
||||||
|
using Orchard.Core.Navigation.Models;
|
||||||
using Orchard.Core.Routable.Models;
|
using Orchard.Core.Routable.Models;
|
||||||
using Orchard.Core.Settings.Descriptor.Records;
|
using Orchard.Core.Settings.Descriptor.Records;
|
||||||
using Orchard.Core.Settings.Models;
|
using Orchard.Core.Settings.Models;
|
||||||
@@ -71,7 +72,7 @@ namespace Orchard.Setup.Services {
|
|||||||
//"Reports",
|
//"Reports",
|
||||||
//"Feeds",
|
//"Feeds",
|
||||||
"HomePage",
|
"HomePage",
|
||||||
//"Navigation",
|
"Navigation",
|
||||||
//"Scheduling",
|
//"Scheduling",
|
||||||
//"Indexing",
|
//"Indexing",
|
||||||
//"Localization",
|
//"Localization",
|
||||||
@@ -228,11 +229,11 @@ namespace Orchard.Setup.Services {
|
|||||||
siteSettings.Record.HomePage = "RoutableHomePageProvider;" + page.Id;
|
siteSettings.Record.HomePage = "RoutableHomePageProvider;" + page.Id;
|
||||||
|
|
||||||
// add a menu item for the shiny new home page
|
// add a menu item for the shiny new home page
|
||||||
//var menuItem = contentManager.Create("MenuItem");
|
var menuItem = contentManager.Create("MenuItem");
|
||||||
//menuItem.As<MenuPart>().MenuPosition = "1";
|
menuItem.As<MenuPart>().MenuPosition = "1";
|
||||||
//menuItem.As<MenuPart>().MenuText = T("Home").ToString();
|
menuItem.As<MenuPart>().MenuText = T("Home").ToString();
|
||||||
//menuItem.As<MenuPart>().OnMainMenu = true;
|
menuItem.As<MenuPart>().OnMainMenu = true;
|
||||||
//menuItem.As<MenuItemPart>().Url = "";
|
menuItem.As<MenuItemPart>().Url = "";
|
||||||
|
|
||||||
//Temporary fix for running setup on command line
|
//Temporary fix for running setup on command line
|
||||||
if (HttpContext.Current != null) {
|
if (HttpContext.Current != null) {
|
||||||
|
Reference in New Issue
Block a user