yii2-gentelella icon indicating copy to clipboard operation
yii2-gentelella copied to clipboard

Menu auto open

Open ghost opened this issue 7 years ago • 2 comments

Hello. How can I stop auto open menu when I redirected to some route from the menu?

ghost avatar Feb 23 '18 06:02 ghost

@JayMorrison hello! Menu state is kept in cookie. There is a js code that working with it https://github.com/yiister/yii2-gentelella/blob/master/assets/src/js/extension.js When page is loading the menu state is proceed by layout (https://github.com/yiister/yii2-gentelella/blob/master/views/layouts/main.php see body open tag). You can use modified js or layout template for your task. Did I answer to your question?

fps01 avatar Feb 24 '18 07:02 fps01

@fps01 Thank you for the answer but no. I'm not about this feature. If you click on submenu URL like "Players->Edit player". When this url will be open, the submenu will be open too. I'm about "li>ul.nav.child_menu" will be set "display: block". On "body.nav-md" it's okay, but if you have a little screen and "body.nav-sm" it's really annoying. Page loaded and submenu always opens too.

ghost avatar Feb 24 '18 17:02 ghost