- # add other params
- foreach my $key (keys %$menuitem) {
- next if $key =~ /target|module|action|href|ICON/;
- $menuitem->{href} .= "&" . $::form->escape($key, 1) . "=";
- my ($value, $conf) = split(/=/, $menuitem->{$key}, 2);
- $value = $::myconfig{$value} . "/$conf" if ($conf);
- $menuitem->{href} .= $::form->escape($value, 1);
- }
-
- my @common_args = ($label, $spacer, join '_', @id_stack);
-
- if ($spacer eq 's0') { # toplevel
- push @items, [ @common_args, "icon24 $icon_class", 'm' ];
- } elsif ($menuitem->{submenu}) {
+ if (!$node->{parent}) { # toplevel
+ push @items, [ @common_args, "icon24 $node->{icon}", 'm' ];
+ } elsif ($node->{children}) {