7 Answer(s)
-
0
Hi,
You can add
kt-menu__item--activeto menu item you want to expand. Metronic will automatically expand the item for you.Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi @ismcagdas
Where and how do we put the class? With CustomData on the MenuItemDefinition?
I have tried to add kt-menu__item--active on the "li" element, but it does not seem to work.
I can see that on menues expanded, there is a class on the "li" element: kt-menu__item--open And this disappear ones selecting another menu item.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
You have to put it here https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/Areas/AppAreaName/Views/Shared/Components/AppAreaNameMenu/_UserMenuItem.cshtml#L9.
Currently only active menu item (and its parents) have this css class.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi @ismcagdas
thank you :-)
but it looks like the menu is rebuilding every time you select another menu item. Is there any way to catch if a menu item is "open" and keep that state when selecting another item - eg. with no sub items?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi @deltavision,
This functionality is not the out of box functionality. So, you need to implement it somehow. You can store selected menu item in Browser's local storage and use it when the page is reloaded.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi @ismcagdas
stored the root of the selected sub-menu in session storage - and and class "kt-menu__item--open" based on that in _UserMenuItem
I close this case.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Thanks @deltavision :)
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)
