This question is locked. New answers and comments are not allowed.
I have created a submenu for Admin users, and would like the submenu to be hidden, if the logged in user is not an administrator.
at the moment, the submenu items are hidden however, the menu containing the authorized menu items still shows up. Is there a way to hide a submenu if there are no items within it?
at the moment, the submenu items are hidden however, the menu containing the authorized menu items still shows up. Is there a way to hide a submenu if there are no items within it?
@(Html.Telerik().Menu() .Name("menu") .Items(menu => { menu.Add().Text("Home").Action("Index", "Home"); menu.Add().Text("About").Action("About", "Home"); menu.Add().Text("Users").Action("Index", "User"); menu.Add().Text("Admin").Items(adminMenu => { adminMenu.Add().Text("Users").Action("Index", "User"); adminMenu.Add().Text("View messages").Action("Index", "AdminMessages"); }).Enabled(false); }))