sidebar_minimize_state
cookie value in server side and add data-kt-aside-minimize="on"
to the body element and add active
class to the toggle element.src/js/layout/sidebar.js
and add // Private functions
var handleToggle = function () {
// Store sidebar minimize state in cookie
toggleObj.on("kt.toggle.changed", function() {
// In server side check sidebar_minimize_state cookie
// value and add data-kt-app-sidebar-minimize="on"
// attribute to Body tag and "active" class to the toggle button
var date = new Date(Date.now() + 30 * 24 * 60 * 60 * 1000); // 30 days from now
var state = toggleObj.isEnabled() ? "on" : "off";
KTCookie.set("sidebar_minimize_state", toggleObj.isEnabled() ? "on" : "off", {expires: date});
});
}