habe folgende Navigation:
Code: Alles auswählen
<p>
<ul id="nav1st">
<li id="active"><a id="current" href="index.php?article_id=1">Home</a></li>
<li><a href="index.php?article_id=20">Was sind ?</a></li>
<li><a href="index.php?article_id=26">360 Grad Ansicht</a></li>
<li><a href="index.php?article_id=24">Sportarten</a></li>
<li><a href="index.php?article_id=2">Modelle</a>
<ul id="nav2nd">
<li><a href="index.php?article_id=21">Ultraduenn</a></li>
<li><a href="index.php?article_id=22">2mm</a></li>
<li><a href="index.php?article_id=23">3mm</a></li>
</ul>
</li>
<li><a href="index.php?article_id=4">Kontakt</a></li>
<li><a href="index.php?article_id=5">Gaestebuch</a></li>
<li><a href="index.php?article_id=6">Kaufen</a></li>
<li><a href="index.php?article_id=7">Impressum</a></li>
<li><a href="index.php?article_id=8">Sitemap</a></li>
</ul>
</p>
Code: Alles auswählen
<?php
// EXPLODE PATH
$PATH = explode("|",$this->getValue("path").$this->getValue("article_id")."|");
// GET CURRENTS
$path1 = $PATH[1];
$path2 = $PATH[2];
$path3 = $PATH[3];
/* START 1st level categories */
$navLeftCol .= '<ul id="nav1st">';
foreach (OOCategory::getRootCategories() as $lev1) {
if ($lev1->isOnline()):
if ($lev1->getId() == $path1) {
$navLeftCol .= '<li id="active"><a id="current" href="'.$lev1->getUrl().'">'.$lev1->getName().'</a>';
if ($lev1->getId() != "1") {
$sitePath .= ' ›› <a href="'.$lev1->getUrl().'">'.$lev1->getName().'</a>';
}
$titlePath .= ' >> '.$lev1->getName();
}
// 1st level - no active link
else {
$navLeftCol .= '<li><a href="'.$lev1->getUrl().'">'.$lev1->getName().'</a>';
}
// 1st level had categories? -> go on
$lev1Size = sizeof($lev1->getChildren());
if ($lev1Size != "0"):
$navLeftCol .= '<ul id="nav2nd">';
// START 2nd level categories
foreach ($lev1->getChildren() as $lev2):
if ($lev2->isOnline()):
// 2nd level - active link
if ($lev2->getId() == $path2) {
$navLeftCol .= '<li id="active"><a id="current" href="'.$lev2->getUrl().'">'.$lev2->getName().'</a></li>';
$sitePath .= ' ›› <a href="'.$lev2->getUrl().'">'.$lev2->getName().'</a>';
$titlePath .= ' >> '.$lev2->getName();
}
// 2nd level - no active link
else {
$navLeftCol .= '<li><a href="'.$lev2->getUrl().'">'.$lev2->getName().'</a></li>';
}
endif;
endforeach;
// END 2nd level categories
$navLeftCol .= '</ul>';
endif; // END by if ($lev1Size != "0"):
$navLeftCol .= '</li>';
endif; // END by if ($lev1->isOnline())
}
$navLeftCol .= '</ul>';
// 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 befinden sich hier: <a href="/index.php">Startseite</a> '.$sitePath;
?>
Vielen dank schonmal.