momentan hab ich folgenden Code, der die Navigation erzeugt:
Doch nun würde ich gerne noch eine 4. Ebenenstufe dazuhaben.<?php
// EXPLODE PATH
$PATH = explode("|",$this->getValue("path").$this->getValue("article_id")."|");
// GET CURRENTS
$path1 = $PATH[1];
$path2 = $PATH[2];
$path3 = $PATH[3];
$path4 = $PATH[4];
$path5 = $PATH[5];
/* START 1st level categories */
$navHeader .= "\r\n".'<ul id="Navigation">'."\r\n";
$navLeftCol='';
foreach (OOCategory::getRootCategories() as $lev1) {
if ($lev1->isOnline()):
if ($lev1->getId() == $path1) {
$navHeader .= "\t".'<li class="active"><a class="current" href="'.$lev1->getUrl().'">'.$lev1->getName().'</a></li><!--deep_nav-->'."\r\n";
if ($lev1->getId() != "1") {
$sitePath .= ' ›› <a href="'.$lev1->getUrl().'">'.$lev1->getName().'</a>';
}
$titlePath .= ' >> '.$lev1->getName();
}
// 2nd level - no active link
else {
$navHeader .= "\t".'<li><a href="'.$lev1->getUrl().'">'.$lev1->getName().'</a></li>'."\r\n";
}
// 1st level had categories? -> go on
$lev1Size = sizeof($lev1->getChildren());
if ($lev1->getId() == $path1) {
if ($lev1Size != "0"):
$navLeftCol .= "\r\n"."\t"."<li id=\"nav2nd\"><!--fehler-->\r\n"."\t"."\t".'<ul>'."\r\n";
// START 2nd level categories
foreach ($lev1->getChildren() as $lev2):
if ($lev2->isOnline()):
// 2nd level - active link
if ($lev2->getId() == $path2) {
$navLeftCol .= "\r\n\t"."\t"."\t".'<li class="active"><a class="current" href="'.$lev2->getUrl().'">'.$lev2->getName().'</a>';
$sitePath .= ' ›› <a href="'.$lev2->getUrl().'">'.$lev2->getName().'</a>';
$titlePath .= ' >> '.$lev2->getName();
}
// 2nd level - no active link
else {
$navLeftCol .= "\r\n\t"."\t"."\t".'<li><a href="'.$lev2->getUrl().'">'.$lev2->getName().'</a></li>'."\r\n";
}
// 2st level had categories? -> go on
$lev2Size = sizeof($lev2->getChildren());
if ($lev2->getId() == $path2) {
if ($lev2Size != "0"):
$navLeftCol .= '</li>'."\r\n"."\t"."\t"."\t".'<li><ul class="nav3rd">'."\r\n";
// START 3nd level categories
foreach ($lev2->getChildren() as $lev3):
if ($lev3->isOnline()):
// 3nd level - active link
if ($lev3->getId() == $path3) {
$navLeftCol .= "\r\n\t"."\t"."\t"."\t".'<li class="active"><a class="current" href="'.$lev3->getUrl().'">'.$lev3->getName().'</a>';
$sitePath .= ' ›› <a href="'.$lev3->getUrl().'">'.$lev3->getName().'</a>';
$titlePath .= ' >> '.$lev3->getName();
}
// 3nd level - no active link
else {
$navLeftCol .= "\t"."\t"."\t"."\t".'<li><a href="'.$lev3->getUrl().'">'.$lev3->getName().'</a>';
}
endif;
$navLeftCol .= '</li>'."\r\n";
endforeach;
$navLeftCol .= "\t"."\t"."\t".'</ul>'."\r\n";
// END 3nd level categories
endif;
$navLeftCol .= "\t"."\t\t".'</li>'."\r\n";
}
// END 2nd level categories
endif; // END by if ($lev1Size != "0"):
endforeach;
//$navHeader .= "\t".'</li>'."\r\n";
endif;
if ($navLeftCol != "") $navLeftCol .= "\t\t ".'</ul>'."\r\n"."\t"."</li>\r\n";
}
endif; // END by if ($lev1->isOnline())
}
$navHeader .= '</ul>'."\r\n";
// END 1st level categories
if ($REX['CUR_CLANG'] == 1) $breadcrumb = 'You are here: <a href="/index.php?clang=1">Startpage</a> '.$sitePath;
else $breadcrumb = 'Sie sind hier: <a href="/index.php">Startseite</a> '.$sitePath;
?>
Habe einiges probiert; kam aber nicht auf den richtigen Code.
Schönen tlw. Feiertag noch.