habe jetzt die ideale Navi für meine Seite gefunden aber die Erweiterung um eine weitere Ebene will mir nicht gelingen *seufz*
Bei dieser Zeile bekomme ich die Meldung: "Call to a member function getChildren() on a non-object":
Code: Alles auswählen
$lev2Size = sizeof($vert2->getChildren());
Code: Alles auswählen
$PATH = explode("|",$this->getValue("path").$this->getValue("article_id")."|");
$path1 = $PATH[1];
$path2 = $PATH[2];
$path3 = $PATH[3];
$path4 = $PATH[4];
$path5 = $PATH[5];
$path6 = $PATH[6];
// Root Kats rausholen
foreach (OOCategory::getRootCategories() as $cat) {
$catId = $cat->getId();
$catUrl = $cat->getUrl();
$catName = $cat->getName();
if ($cat->isOnline(true)) {
$lev1Size = sizeof($cat->getChildren());
$cp = explode('|', $cat->getValue('cat_MenuePosition'));
// top, horizontal, vertikal, bottom
// Vertikales Menue ---------------------------
foreach ($cp as $catPos) :
if($catPos == "links") {
if ($catId == $path1) {
$vm .= '<li><a href="'.$catUrl.'"><strong>'.$catName.'</strong></a></li>';
} else {
$vm .= '<li><a href="'.$catUrl.'">'.$catName.'</a></li>';
}
if ($lev1Size == "0");
}
endforeach;
// Unterkategorien Vertikales Menue -----------
if ($catId == $path1) {
if ($lev1Size != "0") {
$vm .= '<li><ul class="2nd">';
foreach ($cat->getChildren() as $vert2):
if ($vert2->isOnline(true)) {
if ($vert2->getId() == $path2) {
$vm .= '<li><a href="'.$vert2->getUrl().'"><strong>'.$vert2->getName().'</strong></a></li>';
} else {
$vm .= '<li><a href="'.$vert2->getUrl().'">'.$vert2->getName().'</a></li>';
}
}
endforeach;
}
}
// Unterkategorien Vertikales Menue 2-----------
$lev2Size = sizeof($vert2->getChildren());
if ($catId == $path1) {
if ($lev2Size != "0") {
$vm .= '<li><ul class="3rd">';
foreach ($cat->getChildren() as $vert3):
if ($vert3->isOnline(true)) {
if ($vert3->getId() == $path3) {
$vm .= '<li><a href="'.$vert3->getUrl().'"><strong>'.$vert3->getName().'</strong></a></li>';
} else {
$vm .= '<li><a href="'.$vert3->getUrl().'">'.$vert3->getName().'</a></li>';
}
}
endforeach;
$vm .= '</ul></li>';
$vm .= '</ul></li>';
}
}