Hab mal Versucht ein vorprogrammiertes Submenü ein bisschen abzuändern.
Die Hauptnavigationspunkte werden angezeigt, die Submenüpunkte leider nicht...grml...
Irgendwer eine Erklärung dafür?/* Navigation laden */
function get_navigation()
{
$tmprslt = '';
$siteRoot="index.php?cmd=";
$menuStruct=array(
"Home"=>array("root"=>$siteRoot."news"),
"About IMHP"=>array("root"=>$siteRoot."about", "Firmenphilosophie"=>$siteRoot."firmenphilosophie", "Die Mitarbeiter"=>$siteRoot."mitarbeiter", "Solidaritätsfonds"=>$siteRoot."solidaritaetsfonds"),
"Die Akteure"=>array("root"=>$siteRoot."akteure", "Kader"=>$siteRoot."kader", "Spielerbewertungen"=>$siteRoot."spielerbewertungen", "Spielerstatistiken"=>$siteRoot."spielerstatistiken", "Bussenliste"=>$siteRoot."bussenliste", "Dude of the Week"=>$siteRoot."dde_of_the_week"),
"Der Match"=>array("root"=>$siteRoot."match", "Spielplan"=>$siteRoot."spielplan", "Die Trainer"=>$siteRoot."trainer", "Matchberichte"=>$siteRoot."matchberichte", "Die Fans"=>$siteRoot."fans"),
"Blödsinn"=>array("root"=>$siteRoot."bloedsinn", "Fluri"=>$siteRoot."fluri", "Fintsch"=>$siteRoot."fintsch", "Zurflüh"=>$siteRoot."zurflueh", "Oppli"=>$siteRoot."oppli", "Küffer"=>$siteRoot."kueffer"),
"Kabinengeflüster"=>array("root"=>$siteRoot."kabinengefluester"),
"Login"=>array("root"=>$siteRoot."login")
);
if($PHP_SELF == $menuStruct[0]['root']){
foreach($menuStruct as $key=>$value){
if($PHP_SELF == $value['root']){
$tmprslt .= "<div class=\"fstLevelActive\"><a href=".$value['root'].">$key</a></div>\n";
}
else{
$tmprslt .= "<div class=\"fstLevel\"><a href=".$value['root'].">$key</a></div>\n";
}
}
} else {
foreach($menuStruct as $key=>$value){
if($PHP_SELF == $value['root']){
$tmprslt .= "<div class=\"fstLevelActive\"><a href=".$value['root'].">$key</a></div>\n";
}else{
$tmprslt .= "<div class=\"fstLevel\"><a href=".$value['root'].">$key</a></div>\n";
}
foreach($value as $key2=>$value2){
if(array_search($PHP_SELF,$value)){
if($key2 != "root")
if($PHP_SELF == $value2){
$tmprslt .= "<div class=\"secLevelActive\"><a href=".$value2.">$key2</a></div>\n";
}else{
$tmprslt .= "<div class=\"secLevel\"><a href=".$value2.">$key2</a></div>\n";
}
}
}
}
}
return $tmprslt;
}
<div> hab ich noch nicht erstellt, aber die Inhalte sollte es ja trotzdem ausgeben.
http://www.toflar.ch/test/versuch