Hi, guys
When I turn the menu to collapse state and go to an other page the menu turn back to previous state. How do you save the menu state? Maybe cookies?
Many thanks for your answers!
A pure javascript / frontend solution was not possible for me.
You got to send the right class ('sidebar-collapse') right on pageload, if the sidebar should be collapsed.
Like (Laravel Blade):
@if(session('sidebar-collapse', '0') == 1) sidebar-collapse @endif
And then bind the the click on .sidebar-toggle to some event that triggers a request:
$('.sidebar-toggle').click(function() {
if($('body').delay(300).hasClass('sidebar-collapse')) {
$.get('/sidebar/collapse');
}
else {
$.get('/sidebar/decollapse');
}
});
The corresponding site saves the sidebar-collapse var into the session.
Hope i could help a bit.
Due to some neglect in my part, many issues weren't addressed for some time. Some of these issues are no longer relevant since a solution might have been found. Therefore, we decided to close all issues that are over a month old. However, if the issue still persists and you'd like help, then by all means repost your issue and we will consider it again. In the mean time, we will close this post.
Thanks for your understanding and we apologize for any inconvenience <3.
Most helpful comment
A pure javascript / frontend solution was not possible for me.
You got to send the right class ('sidebar-collapse') right on pageload, if the sidebar should be collapsed.
Like (Laravel Blade):
@if(session('sidebar-collapse', '0') == 1) sidebar-collapse @endifAnd then bind the the click on .sidebar-toggle to some event that triggers a request:
The corresponding site saves the sidebar-collapse var into the session.
Hope i could help a bit.