Closed mika76 closed 7 years ago
Hello,
We have managed .active
class code in our admin theme. Please refer to the below link:
http://propeller.in/templates/admin-dashboard/index.html
Else you can also include below code snippet in your template to add .active
class:
$(document).ready(function() {
var sPath=window.location.pathname;
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
$(".pmd-sidebar-nav").each(function(){
$(this).find("a[href='"+sPage+"']").parents(".dropdown").addClass("open");
$(this).find("a[href='"+sPage+"']").parents(".dropdown").find('.dropdown-menu').css("display", "block");
$(this).find("a[href='"+sPage+"']").parents(".dropdown").find('a.dropdown-toggle').addClass("active");
$(this).find("a[href='"+sPage+"']").addClass("active");
});
});
Please let us know if this solution worked for you.
Hi @sunil-digicorp
I was trying to say that the class .active does not exist in the default template. This means I would have to add the admin template to my project which I don't want to do.
I think you should add it to the standard template, since you have sidebar there and it's weird not to have an active state for a menu.
Hello, Your point is noted. We will include in out next release.
There does not seem to be an active class that working in the sidebar menu?