OK..

it's quite simple.
at first I edited the XML of the different link types like content_blog_section in administrator/components/com_menu/
there you have to add the line
Code: Select all
<param name="item_sfx" type="text" default="" label="Item Suffix" description="For every menu point a seperate css class" />
with this line you get a form field where you can add a suffix.
the second step is to add some lines in the mod_mainmenu.php in /modules/
function mosGetMenuLink( $mitem, $level=0, &$params, $open=null ) {
global $Itemid, $mosConfig_live_site, $mainframe;
$txt = '';
$css_params = new mosParameters( $mitem->params );
//ADD THIS
switch ($mitem->type)..
------------------------
// Active Menu highlighting
$current_itemid = $Itemid;
if ( !$current_itemid ) {
$id = '';
} else if ( $current_itemid == $mitem->id ) {
$id = 'id="active_menu'. $css_params->get('item_sfx') . $params->get( 'class_sfx' ) .'"';
//CHANGE IT LIKE THAT!
} else if( $params->get( 'activate_parent' ) && isset( $open ) && in_array( $mitem->id, $open ) ) {
$id = 'id="active_menu'. $css_params->get('item_sfx') . $params->get( 'class_sfx' ) .'"';
//CHANGE IT LIKE THAT
---------------------------
if ( $params->get( 'full_active_id' ) ) {
// support for `active_menu` of 'Link - Component Item'
if ( $id == '' && $mitem->type == 'component_item_link' ) {
parse_str( $mitem->link, $url );
if ( $url['Itemid'] == $current_itemid ) {
$id = 'id="active_menu' . $css_params->get('item_sfx') . $params->get( 'class_sfx' ) .'"';
//CHANGE IT LIKE THAT!
--------------------------------
// run through SEF convertor
$mitem->link = sefRelToAbs( $mitem->link );
$menuclass = 'mainlevel'. $params->get( 'class_sfx' ) . $css_params->get('item_sfx');
//ADD
if ($level > 0) {
$menuclass = 'sublevel'. $params->get( 'class_sfx') . $css_params->get('item_sfx');
//ADD
}
Ok. That's it.. now you can give every menu item a different suffix. and #active_menu changes to #active_menu_suffix
the changes are only for content_blog_section
if you want the feature in other link types you have to add it in the xml file of the link type.