Account created on 19 March 2007, almost 18 years ago
#

Recent comments

🇨🇭Switzerland mkalbere

Here is a very ugly, but working js workaround to remove empty menus, not clean, but my customer doesn't want to wait ;-)
It fit my needs, but maybe not all cases.

Drupal.behaviors.menu_hack = {
attach: function(context, settings) {
do {
$(".toolbar-menu-administration ul:not(:has(li))").remove();
$(".toolbar-menu-administration li.menu-item--expanded").each(function() {
if ($("ul", this).length == 0) {
$(this).remove();
}
})
} while ($(".toolbar-menu-administration ul:not(:has(li))").length > 0);
}
}

Production build 0.71.5 2024