I am using the template on a visual studio c# project (cshtml). So by design, I have set the left menu to be used by multiple templates on my project.
Issue now, is if I click a sub-menu list item which takes user to a different page - on demo the clicked link and menu item remain open in the new page. Which is the functionality I need
- but upon templating in visual studio, clicking on menu / sub-menu item.. on new page the clicked/active link is closed.
So with reference to screenshot attached. If I click a menu item for dashboard
(either dashboard 1, 2 3).. when that page loads, how do I keep Dashboard menu item open on this new page? What am I missing to maintain this functionality in my visual studio project?
And the menu will automatically expanded to the active element.
While trying this, I saw that there is a missing class "visible" on child elements of menus that have active item, so you can apply this CSS to fix it:
.sidebar-menu .main-menu .has-sub.active > ul { display: block !important; }
I am using the template on a visual studio c# project (cshtml). So by design, I have set the left menu to be used by multiple templates on my project.
Issue now, is if I click a sub-menu list item which takes user to a different page
- on demo the clicked link and menu item remain open in the new page. Which is the functionality I need
- but upon templating in visual studio, clicking on menu / sub-menu item.. on new page the clicked/active link is closed.
So with reference to screenshot attached. If I click a menu item for dashboard
(either dashboard 1, 2 3).. when that page loads, how do I keep Dashboard menu item open on this new page? What am I missing to maintain this functionality in my visual studio project?
Hi Otacon_Alonsus,
If you want to set an active item, you have to assign "active" class to that element only, lets say for example:
(view large version)
Then in HTML code that is used for the menu you have to assign class "active" for Calendar element only:
(view large version)
Also make sure that "main-menu" element has "auto-inherit-active-class" class:
(view large version)
And the menu will automatically expanded to the active element.
While trying this, I saw that there is a missing class "visible" on child elements of menus that have active item, so you can apply this CSS to fix it:
I hope this will help you.