Elxis CMS Forum

Extensions => Modules => Topic started by: illusion-web-solutions on April 15, 2014, 22:32:14

Title: mod_eisfish_menu
Post by: illusion-web-solutions on April 15, 2014, 22:32:14
once again I need your help please
Iam using Module eisfish menu 1.2 on an an Elxis 2009.3 website

and i need to modify mod_eifish_menu.php

the menu is 4 levels ( Top - 2nd - 3rd - 4th )  the top level is the main menu levels then 3 sub menus under it.

when a 3rd or 4th sub menu link clicked it do not give "Current" class to any ( li ) exept in the top level and current level ( 3rd or 4th )

what i need to do is modify the module so it gives current class to all top levels ( li )

i go to mod_eisfish_menu.php and try to do that, what i found is that i have to add a condition into this code

Code: [Select]
$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];
}

}

Spicily inside

Code: [Select]
if ($row->id == $hilightid || $current_itemid == $row->id || additional condition to add current class to 3rd and 2nd submenu li ) {
$li = '<li class="current">';
}

and i try alot but without success to find a way to do that

if you please help me figure out this condition please

thanks all in advance
Title: Re: mod_eisfish_menu
Post by: datahell on May 01, 2014, 22:02:02
if ($level == X) { do that }
Title: Re: mod_eisfish_menu
Post by: illusion-web-solutions on May 01, 2014, 22:27:33
if ($level == X) { do that }

i already tried that but my problem is i need to spacify that i means when level = x and &&  id equals current item parent id

this i couldn't figure it out :S
Title: Re: mod_eisfish_menu
Post by: datahell on May 01, 2014, 22:35:31
Root elements are of level 0

if ($level == 0) { do that }
Title: Re: mod_eisfish_menu
Post by: illusion-web-solutions on May 01, 2014, 22:48:01
let me explane my point of view

what i already did is
Code: [Select]
if ($row->id == $hilightid || $current_itemid == $row->id || $level ==1 && Condition  ) {
$li = '<li class="current">';
}

the condition i need your help in it is if the item in level 1 id ( which got the children in level 2 ) equals == the current level 2 parent id ( which is in level 1 )

:S