Re: Main Menu Image hack For those like me who struggle with scripting, I thought of posting the complete code with amendments:
----------------------------------------------------------------------------------------------------
$txt = '<a href="'. $mitem->link .'" class="'. $menuclass .'" '. $id .'>';
}
if ( $params->get( 'menu_images' ) ) {
$menu_params = new stdClass();
$menu_params =& new mosParameters( $mitem->params );
$menu_image = $menu_params->def( 'menu_image', -1 );
if ( ( $menu_image <> '-1' ) && $menu_image ) {
$image = '<img src="'. $mosConfig_live_site .'/images/stories/'. $menu_image .'" border="0" alt="'. $mitem->name .'"/>';
if ( $params->get( 'menu_images_align' ) ) {
$txt = $image;
} else {
$txt .= $image .' '. $txt;
}
}
}
if (!strstr($mitem->name,'blank'))
$txt.= $mitem->name;
$txt.='</a>';
return $txt;
break;
}
-----------------------------------------------------------------------------------------------------
Thank you ssdesign (Flash Guru) for the original solution and to everyone else for the fine-tuning. I have a question, does anyone know when using the above is it possible to do an image swap. If not with this solution then can anyone suggest how an image swap can be incorporated with the main menu image hack above.
Thank you all
Abs
Last edited by abdulmambo; 02.05.2005 at 16:27.
Reason: Spelling check and additional comments
|