Verfasst: Mi 5. Feb 2003, 02:40
Ich würde die Hauptnavi nun auch gern ausprobieren, aber mein Contenido ist bekanntlich wählerisch, was die Akzeptanz von Layout-Quelltext betrifft. Meine absichtlich schlicht und original gehaltete Navigationsausgabe wird nach Einfügen in das Layoutformular nicht gespeichert.
Es erscheint keinerlei Fehlermeldung, sondern der Text wird einfach nicht übernommen, es ist also noch der alte Inhalt vorhanden. Das ist mir schon mal passiert, damals gings um die Mouseover-Funktion. Weiß jemand Rat, wie ich Contenido überreden kann, den Spinat zu essen? 
Code: Alles auswählen
?>
<html>
<head>
<script language="javascript" src="js/standard.js"></script>
</head>
<body>
<!-- BEGIN MAIN_NAVIGATION -->
<?php
//-----------------------------------------------------------------------------//
$nav_start = '3';
$nav_col_out = "#6699FF";
$nav_col_over = "#9999FF";
$nav_col_back = "#6600FF";
$nav_col_on = "#FF0000";
$nav_col_off = "#000000";
// offenen Pfad finden //
$nav_path = array();
$nav_tree = array();
$tmp_idcat = $idcat;
while($tmp_idcat > 0){
array_push($nav_path, $tmp_idcat);
$tmp_idcat = $con_tree[$tmp_idcat][parent];
};
$nav_path = array_reverse($nav_path);
if($nav_path[0] != $nav_start){$nav_path = array($nav_start);};
// Baum sortieren //
for($i = 0;$i < sizeof($nav_path);$i++){
$tmp_found=0;
for($nr = 0; $nr <= $con_tree_max; $nr++){
if($con_tree[$nr][parent] == $nav_path[$i] && $con_tree[$nr][preid] == '0'){$tmp_found=1;break;}
}
unset($tmp_level);$tmp_level = array();
do{
array_push($tmp_level , $nr);
$nr = $con_tree[$nr][postid];
} while($nr != '0' && $tmp_found==1);
if($i == 0){$nav_tree = $tmp_level;}
else {
$x = array_search("$nav_path[$i]", $nav_tree);
array_splice($nav_tree, $x+1, 0, $tmp_level);
};
};
// Baum ausgeben //
echo "<table width=100% cellspacing=\"5\" cellpadding=\"0\" border=\"0\">\n";
foreach($nav_tree as $nr){
if(($con_tree[$nr][public] == '1' or $auth->auth["uid"] != "nobody") and $con_tree[$nr][visible] == '1'){
echo "<tr><td onMouseOver=\"this.style['background']='".$nav_col_over."';\" ";
echo "onMouseOut=\"this.style['background']='".$nav_col_out."';\" bgcolor=\"$nav_col_out\" nowrap>";
unset($mod_space);$mod_space = array();
$mod_space = array_pad($mod_space,($con_tree[$nr][level] - 1),"&nsbp; ");
echo "<span style='background-color:".$nav_col_back.";'>".implode("",$mod_space)."</span>";
if($nr == $idcat){ echo "<span style='background-color:".$nav_col_on."'> </span>"; }
else { echo "<span style='background-color:".$nav_col_off."'> </span>"; };
echo "<a href=\"".$con_tree[$nr][link]."\" id=\"left-menu\">".$con_tree[$nr][titel]."</a></td></tr>";
};
};
unset($nav_tree);unset($nav_path);
echo "</table>";
?>
<!-- END MAIN_NAVIGATION -->
</body>
</html>