I have three languages on my site.
Enabled activemenu

Then if i click PLUS all works in default language
but if i go EN or RU, for example www.mysite/en/admin
then PLUS sign does not expand, but it changes to minus sign

So its very broken.

Comments

egon.ojamaa’s picture

Priority: Major » Minor

I found out that my template.php was responsible.. i tested some menu things and forgot some code there..

The code was:

function phptemplate_menu_item_link($link) {
  if (empty($link['localized_options'])) {
    $link['localized_options'] = array();
  }

  //check the target for access, assign class to nav items not accessible
global $user;
//assume non-accessible
$has_access = false;

if($target = menu_get_object($type = 'node', $position = 1, $link['href']))
$has_access = node_access("view", $target, $user);

//give access to off-site pages and dummy links
if($link['access_callback'] != "node_access_access" || $link['href']=="javascript:void(0)")
$has_access = true;

if($has_access)
$access_class = " submenu-has-access ";
else
$access_class = " submenu-no-access ";
$link['id'] .= ' menu-'.$link['mlid'];
$link['localized_options']['attributes']['class'] .= $access_class . $link['id'] . ' split';

    return l($link['title'], $link['href'], $link['localized_options']);
}

function phptemplate_menu_item($link, $has_children, $menu = '', $in_active_trail = FALSE, $extra_class = NULL) {
  $class = ($menu ? 'expanded' : ($has_children ? 'collapsed' : 'leaf'));
   
       $m = explode('menu-',$link);
   
      $n = explode(' split',$m[2]);
   
    $mlid = 'menu-id-'. $n[0];
   
  if (!empty($extra_class)) {
    $class .= ' ' . $extra_class;
  }

  if ($in_active_trail) {
    $class .= ' active-trail';
  }
  return '<li id="'.$mlid.'" class="' . $class . '">' . $link . $menu . "</li>\n";
}