möchte gerne die hauptnavigation mit den entsprechenden unternavigations-links sichtbar darstellen (ohne zuerst auf den hauptnavi-link zu klicken), also in der form:
menupunkt1
- unterpunkt11
- unterpunkt12
- unterpunkt13
menupunkt2
- unterpunkt21
- unterpunkt22
- etc.
dabei beginnt die hauptnavi erst bei cat1 (die oberste ebene beinhaltet sprachen-kategorien).
ich möchte aber auch, dass die im backend offline gestellten navi-links nicht sichtbar angezeigt werden.
der grund dieser navi ist, dass ich über php ein dropdownmenu zusammengebastelt hab. das scriptchen hab ich schon bereits. fehlt mir nur noch diese oben aufgeführte struktur.
diesen code hab ich aus dem forum:
-----------------------------------------------
Code: Alles auswählen
<table cellpadding=0 cellspacing=0 border=0 class=Menu>
<tr>
<td><?
// USER STATUS FUER PERSOENLICHE NAVI
$utype_id = 1;
if ($FORM[USR]) $utype_id = $FORM[USER]->getValue("singlestatus");
// PFAD AUSLESEN
$cat_id = $this->getValue("category_id");
$path = explode("-",$this->getValue("path"));
$showpath = "/ <a href=index.php?article_id=8 class=white>Home</a>";
$cat1 = current($path)+0;
next($path);
$cat2 = current($path)+0;
next($path);
$cat3 = current($path)+0;
// 2. NAVI
$NAV2 = "";
$cat_id = $cat3;
@include $REX[INCLUDE_PATH]."/generated/categories/$cat_id.list.category";
$NAV = $REX[RECAT][$cat_id];
for ($i=0;$i<count($NAV);$i++)
{
$id = current($NAV);
$aid = $REX[CAT][$id][article_id];
$name = $REX[CAT][$id][name];
if ($i==0) $NAV2 .= "<table cellpadding=0 cellspacing=0 border=0 id=SubMenu class=SubMenu>";
//<table> Nochmal Eingerueckt um bessere Uebersicht zu bekommen
@include $REX[INCLUDE_PATH]."/generated/articles/$aid.article";
$type_id = $REX[ART][$aid][type_id];
if ($aid == 1) $type_id = 1; // HOME PAGE AUSNAHME
$CST = true;
if ($type_id>$utype_id) $CST = false;
if ($cat3==$id and $REX[CAT][$id][status]==1 and $CST)
{
$NAV2 .= "<tr>
<td class=SubAktivIcon>$AktivIcon</td>
<td class=SubAktivButton>"."<a href=index.php?article_id=$aid>$name</a></td>
</tr>";
}elseif ($REX[CAT][$id][status]==1 and $CST)
{
if ($name == "")
{
$NAV2 .= "<tr>
<td class=SubInaktivIcon></td>
<td class=SubInaktivButtonLeer> </td>
</tr>";
}else
{
$NAV2 .= "<tr>
<td class=SubInaktivIcon>$InaktivIcon</td>
<td class=SubInaktivButton><a href=index.php?article_id=$aid>$name</a></td>
</tr>";
}
}
if (($i+1)==count($NAV)) $NAV2 .= "</table>";
//</table> Nochmal Eingerueckt um bessere Uebersicht zu bekommen
next($NAV);
}
// 1. NAVI
$NAV1 = "";
$cat_id = 1;
@include $REX[INCLUDE_PATH]."/generated/categories/$cat_id.list.category";
$NAV = $REX[RECAT][$cat_id];
for ($i=0;$i<count($NAV);$i++)
{
$id = current($NAV);
$aid = $REX[CAT][$id][article_id];
$name = $REX[CAT][$id][name];
if ($i==1) $NAV1 .= "<table cellpadding=0 cellspacing=0 border=0 id=MainMenu class=MainMenu>";
//<table> Nochmal Eingerueckt um bessere Uebersicht zu bekommen
@include $REX[INCLUDE_PATH]."/generated/articles/$aid.article";
$type_id = $REX[ART][$aid][type_id];
if ($aid == 1) $type_id = 1; // HOME PAGE AUSNAHME
$CST = true;
if ($type_id>$utype_id) $CST = false;
if ($cat3==$id and $REX[CAT][$id][status]==1 and $CST)
{
$NAV1 .= "<tr>
<td class=MainAktivIcon>$AktivIcon</td>
<td class=MainAktivButton>"."<a href=index.php?article_id=$aid>$name</a></td>
</tr>";
if ($NAV2 != "") $NAV1 .= "<tr>
<td class=MainInaktivIcon></td>
<td>$NAV2</td>
</tr>";
}elseif ($REX[CAT][$id][status]==1 and $CST)
{
if ($name == "")
{
$NAV1 .= "<tr>
<td></td>
<td class=MainInaktivButtonLeer>$NAV2</td>
</tr>";
}else
{
$NAV1 .= "<tr>
<td class=MainInaktivIcon>$InaktivIcon</td>
<td class=MainInaktivButton><a href=index.php?article_id=$aid>$name</a></td>
</tr>";
}
}
if (($i+1)==count($NAV)) $NAV1 .= "</table>";
//</table> Nochmal Eingerueckt um bessere Uebersicht zu bekommen
next($NAV);
}
echo $NAV1;
?>
</td>
</tr>
</table>
nur eben, dass diese navi erst beim klick auf den hauptlink die unternavi anzeigt. kann das sichtbarmachen aller unternavi-links realisiert werden?
danke für eure hilfe. gruss