diff --git a/Bootstrap.Admin/Models/NavigatorBarModel.cs b/Bootstrap.Admin/Models/NavigatorBarModel.cs index db685a43..d365134f 100644 --- a/Bootstrap.Admin/Models/NavigatorBarModel.cs +++ b/Bootstrap.Admin/Models/NavigatorBarModel.cs @@ -10,9 +10,19 @@ namespace Bootstrap.Admin.Models public NavigatorBarModel(string url) { Navigations = MenuHelper.RetrieveNavigationsByUserName(UserName); - Navigations.ToList().ForEach(m => m.Active = m.Url.Equals(url, StringComparison.OrdinalIgnoreCase) ? "active" : ""); + ActiveMenu(null, Navigations.ToList(), url); HomeUrl = "~/Admin/Index"; } + + private void ActiveMenu(Menu parent, List