wenn du das standart menü nimmst
kannst doch mal versuchen die mod_mainmenu.php zu editieren
und zwar hier
PHP-Code:
/**
* Vertically Indented Menu
*/
function mosShowVIMenu( &$params ) {
global $database, $my, $cur_template, $Itemid;
global $mosConfig_absolute_path, $mosConfig_live_site, $mosConfig_shownoauth;
/* If a user has signed in, get their user type */
$intUserType = 0;
if($my->gid){
switch ($my->usertype) {
case 'Super Administrator':
$intUserType = 0;
break;
case 'Administrator':
$intUserType = 1;
break;
case 'Editor':
$intUserType = 2;
break;
case 'Registered':
$intUserType = 3;
break;
case 'Author':
$intUserType = 4;
break;
case 'Publisher':
$intUserType = 5;
break;
case 'Manager':
$intUserType = 6;
break;
}
} else {
/* user isn't logged in so make their usertype 0 */
$intUserType = 0;
}
$and = '';
if ( !$mosConfig_shownoauth ) {
$and = "\n AND access <= " . (int) $my->gid;
}
$sql = "SELECT m.*"
. "\n FROM #__menu AS m"
. "\n WHERE menutype = " . $database->Quote( $params->get( 'menutype' ) )
. "\n AND published = 1"
. $and
. "\n ORDER BY parent, ordering";
$database->setQuery( $sql );
$rows = $database->loadObjectList( 'id' );
// indent icons
switch ( $params->get( 'indent_image' ) ) {
case '1':
// Default images
$imgpath = $mosConfig_live_site .'/images/M_images';
for ( $i = 1; $i < 7; $i++ ) {
$img[$i] = '<img src="'. $imgpath .'/indent'. $i .'.png" alt="" />';
}
break;
case '2':
// Use Params
$imgpath = $mosConfig_live_site .'/images/M_images';
for ( $i = 1; $i < 7; $i++ ) {
if ( $params->get( 'indent_image'. $i ) == '-1' ) {
$img[$i] = NULL;
} else {
$img[$i] = '<img src="'. $imgpath .'/'. $params->get( 'indent_image'. $i ) .'" alt="" />';
}
}
break;
case '3':
// None
for ( $i = 1; $i < 7; $i++ ) {
$img[$i] = NULL;
}
break;
default:
// Template
$imgpath = $mosConfig_live_site .'/templates/'. $cur_template .'/images';
for ( $i = 1; $i < 7; $i++ ) {
$img[$i] = '<img src="'. $imgpath .'/indent'. $i .'.png" alt="" />';
}
break;
}
$indents = array(
// block prefix / item prefix / item suffix / block suffix
array( '<table width="100%" border="0" cellpadding="0" cellspacing="0">', '<tr align="left"><td>' , '</td></tr>', '</table>' ),
array( '', '<div style="padding-left: 4px; padding-bottom:2px; background-image: url(images/button3.png);">'. $img[2] , '</div>', '' ),
array( '', '<div style="padding-left: 8px; padding-top:2px; background-image: url(images/button4.png);">'. $img[2] , '</div>', '' ),
array( '', '<div style="padding-left: 12px; padding-top:2px; background-image: url(images/button4.png);">'. $img[3] , '</div>', '' ),
array( '', '<div style="padding-left: 16px">'. $img[4] , '</div>', '' ),
array( '', '<div style="padding-left: 20px">'. $img[5] , '</div>', '' ),
array( '', '<div style="padding-left: 24px">'. $img[6] , '</div>', '' ),
)
wobei das idents array am ende für das allgemeine aussehen der menüstruktur is
aber mehr wüßt ich jetzt auch nich evtl kannst ja mittels ner zählschleife und dem globalem $itemid was machen?
also abhänig von der id ne andere css classe als class="mainlevel" zuweisen mit hintergrundbild1 etc???
gruß
Lesezeichen