- $menuitem->{module} ||= $::form->{script};
- $menuitem->{action} ||= "section_menu";
- $menuitem->{href} ||= "$menuitem->{module}?action=$menuitem->{action}";
-
- # add other params
- foreach my $key (keys %$menuitem) {
- next if $key =~ /target|module|action|href/;
- $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, "$id_prefix\_$id");
-
- if (!$level) { # toplevel
- push @items, [ @common_args, "icon24 $icon_class", 'm' ];
- # make_image(size => 24, label => $item),
- push @items, section_menu($menu, $item, "$id_prefix\_$id");
- } elsif ($menuitem->{submenu}) {
+ if (!$node->{parent}) { # toplevel
+ push @items, [ @common_args, "icon24 $node->{icon}", 'm' ];
+ } elsif ($node->{children}) {