-    my $label         = $::locale->text($olabel);
-
-    $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);
-    }
+    # do id stack
+    push @id_stack, -1 if    $level > $#id_stack;
+    pop @id_stack      while $level < $#id_stack;
+    $id_stack[-1]++;