diff --git a/src/Orchard.Web/Core/Navigation/Drivers/MenuWidgetPartDriver.cs b/src/Orchard.Web/Core/Navigation/Drivers/MenuWidgetPartDriver.cs index 5da71fb1f..db5558cf1 100644 --- a/src/Orchard.Web/Core/Navigation/Drivers/MenuWidgetPartDriver.cs +++ b/src/Orchard.Web/Core/Navigation/Drivers/MenuWidgetPartDriver.cs @@ -115,21 +115,24 @@ namespace Orchard.Core.Navigation.Drivers { else { var topLevelItems = menuItems.ToList(); - // should the menu be filtered on the currently displayed page ? - if (!part.ShowFullMenu) { - // apply start level by pushing children as top level items. When the start level is - // greater than 1 (ie. below the top level), only menu items along the selected path - // will be displayed. - for (var i = 0; topLevelItems.Any() && i < part.StartLevel - 1; i++) { - var temp = new List(); - if (selectedPath != null) { - topLevelItems = topLevelItems.Intersect(selectedPath.Where(x => x.Selected)).ToList(); - foreach (var menuItem in topLevelItems) { - temp.AddRange(menuItem.Items); - } + // apply start level by pushing children as top level items. When the start level is + // greater than 1 (ie. below the top level), only menu items along the selected path + // will be displayed. + for (var i = 0; topLevelItems.Any() && i < part.StartLevel - 1; i++) { + var temp = new List(); + // should the menu be filtered on the currently displayed page ? + if (part.ShowFullMenu) { + foreach (var menuItem in topLevelItems) { + temp.AddRange(menuItem.Items); } - topLevelItems = temp; } + else if (selectedPath != null) { + topLevelItems = topLevelItems.Intersect(selectedPath.Where(x => x.Selected)).ToList(); + foreach (var menuItem in topLevelItems) { + temp.AddRange(menuItem.Items); + } + } + topLevelItems = temp; } // limit the number of levels to display (down from and including the start level) diff --git a/src/Orchard.Web/Core/Navigation/Views/EditorTemplates/Parts.MenuWidget.Edit.cshtml b/src/Orchard.Web/Core/Navigation/Views/EditorTemplates/Parts.MenuWidget.Edit.cshtml index e66054fe1..c505a208b 100644 --- a/src/Orchard.Web/Core/Navigation/Views/EditorTemplates/Parts.MenuWidget.Edit.cshtml +++ b/src/Orchard.Web/Core/Navigation/Views/EditorTemplates/Parts.MenuWidget.Edit.cshtml @@ -44,10 +44,8 @@ -
-
- @Html.EditorFor(m => m.ShowFullMenu) - - @T("Check for the menu to be display without filtering the selected current page.") -
-
\ No newline at end of file +
+ @Html.EditorFor(m => m.ShowFullMenu) + + @T("Check for the menu to be display without filtering the selected current page.") +
\ No newline at end of file