$li = "\n".$indents[$n][1] ; $current_itemid = trim( mosGetParam( $_REQUEST, 'Itemid', 0 ) ); if ($row->id == $hilightid || $current_itemid == $row->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]; } }
if ($row->id == $hilightid || $current_itemid == $row->id || additional condition to add current class to 3rd and 2nd submenu li ) { $li = '<li class="current">'; }
if ($level == X) { do that }
if ($row->id == $hilightid || $current_itemid == $row->id || $level ==1 && Condition ) { $li = '<li class="current">'; }