From 4f6178eca0a34ac98f1d132e284502e2456ad7bd Mon Sep 17 00:00:00 2001 From: slawkens Date: Fri, 17 Jan 2025 21:07:02 +0100 Subject: [PATCH] Initialize menus with menu_categories If user add custom categories, it will fix an issue where Menu is not collapsed --- templates/tibiacom/index.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/templates/tibiacom/index.php b/templates/tibiacom/index.php index aa8785ff..a03ff3e3 100644 --- a/templates/tibiacom/index.php +++ b/templates/tibiacom/index.php @@ -115,6 +115,15 @@ if(isset($config['boxes'])) menu[0] = {}; var unloadhelper = false; + + // load the menu and set the active submenu item by using the variable 'activeSubmenuItem' function LoadMenu() { @@ -122,7 +131,7 @@ if(isset($config['boxes'])) document.getElementById("ActiveSubmenuItemIcon_"+activeSubmenuItem).style.visibility = "visible"; menus = localStorage.getItem('menus'); if(menus == null || menus.lastIndexOf("&") === -1) { - menus = "news=1&account=0&community=0&library=0&forum=0&"; + menus = ""; } FillMenuArray(); InitializeMenu();