Metronic has a way of creating a section header in the menu. Is there a way to create those section headers in the standard NavigationProvider MenuDefinition structure?
3 Answer(s)
-
0
Hi,
It is not supported by default. However, MenuItemDefinition class has a property named CustomData, see https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp/Application/Navigation/MenuItemDefinition.cs#L71. You can use this field to set a Section name. Then, you can group MenuItems in the related cshtml file and show this data when rendering the Menu.
-
0
I've searched the forum and this discussion board and haven't found any examples of how to use the CustomData property. Do you have any such examples?
-
0
Hi,
It is very simple, you just need to set this field when defining a MenuItem;
new MenuItemDefinition( AppAreaNamePageNames.Host.Dashboard, L("Dashboard"), url: "AppAreaName/HostDashboard", icon: "flaticon-line-graph", permissionDependency: new SimplePermissionDependency(AppPermissions.Pages_Administration_Host_Dashboard), order: 1 ){ CustomData = "Test..." }