0
Garysund created
4 Answer(s)
-
0
I have the _Sidebar.cshtml code
@if (menuItem.Items.IsNullOrEmpty()) { <a href="@menuItem.CalculateUrl(ApplicationPath)"> <i class="@menuItem.Icon"></i> <span class="title">@menuItem.DisplayName</span> <span class="count">@menuItem.CustomData</span> </a> }
`.AddItem(new MenuItemDefinition( PageNames.App.Common.Employee, L("Employees"), url: "Mpa/employees", requiredPermissionName: AppPermissions.Pages_Administration_Employees, customData : 4 )`
I can add the count on the MpaNavigationProvider.cs and pass through the count as customData. Will the above code work
-
0
You don't need that I guess. You can use
Model.MenuItem.Items.Count
to show the child item count.Or you can use a javascript code to create those numbers after the menu is rendered. Because in some cases, menu items might not be displayed for users who doesn't have required permission.
-
0
No response for 15 days from the owner. closing...