/****************************************************/ /* PROCESS RECURSE LIST MENU */ /****************************************************/ private function mosRecurseListMenu( $id, $level, &$children, $open, &$indents, $class_sfx, $highlight ) { global $Itemid, $mainframe; if (@$children[$id]) { $n = min( $level, count( $indents )-1 ); if ($level==0) { echo '<ul class="'.$this->excss.'">'; } else { echo $indents[$n][0]; } foreach ($children[$id] as $row) { switch ($row->type) { case 'separator': // do nothing $row->link = "seperator"; break; case 'url': if ( eregi( 'index.php\?', $row->link ) ) { if ( !eregi( 'Itemid=', $row->link ) ) { $row->link .= '&Itemid='.$row->id; } } break; default: $row->link .= '&Itemid='.$row->id; break; } $li = "\n".$indents[$n][1] ; $current_itemid = trim( mosGetParam( $_REQUEST, 'Itemid', 0 ) ); if ($row->link != 'seperator' && $current_itemid == $row->id || $row->id == $highlight || (sefRelToAbs($Itemid == $id))) { $li = '<li class="current">'; } echo $li; echo $this->mosGetLink( $row, $level, $class_sfx ); $this->mosRecurseListMenu( $row->id, $level+1, $children, $open, $indents, $class_sfx, "" ); echo $indents[$n][2]; } echo "\n".$indents[$n][3]; } }
.current:nth-child(1n+0) a { color: #007eff; background: url(../images/menu_hover.png) repeat; text-shadow: 3px 3px 3px 3px #000;}
ul.sf-menu li.current a { color: #007eff; background: url(../images/menu_hover.png) repeat; text-shadow: 3px 3px 3px 3px #000;}
You are right, I just checked at one site where I used that module and it is giving "current" class to all menu items. However, I never had any problems with it. I obviously had "current" class from the beginning, so I never noticed. I can't give the link here, but it's working fine. Just edit css.