Neues Hauptmenu (Sven) jetzt mit Modul waagerechter Navig.
Verfasst: Di 22. Okt 2002, 10:20
Fortführung der Navigation von Sven:
"Wer sich mit PHP auskennt, wird feststellen, dass hier eine 2. Abfrage ist, die auch die Seiten abruft. Diese wird für die Hauptnavigation noch nicht benötigt. Ist aber hilfreich, wenn man eine noch bessere Navigation schaffen will."
-------------------------------------------
Ich habs mal versucht:
(Dieses Modul liefert Links auf die Seiten innerhalb der gleichen Ebene des Strukturbaums)
Also: In die Datei front_content.php der jeweiligen Clients wird folgende Abfrage von Sven reinkopiert
(vor die Zeile mit "if (!$idcatside) {" ):
// Seiten einlesen //
$sql = "SELECT A.idcat, A.idside, A.is_start, B.title, B.summary, C.public FROM $cfgTab_cat_side AS A, $cfgTab_side_lang AS B, $cfgTab_cat_lang AS C, $cfgTab_cat AS D WHERE A.idside=B.idside AND A.idcat=C.idcat AND C.idcat=D.idcat AND B.online='1' AND C.visible='1' AND D.idclient='$client' order by B.title asc";
$db->query($sql);
while($db->next_record()){
$con_side[$db->f("idcat")][$db->f("idside")][idcat] = $db->f("idcat");
$con_side[$db->f("idcat")][$db->f("idside")][idside] = $db->f("idside");
$con_side[$db->f("idcat")][$db->f("idside")][is_start] = $db->f("is_start");
$con_side[$db->f("idcat")][$db->f("idside")][title] = $db->f("title");
$con_side[$db->f("idcat")][$db->f("idside")][summary] = $db->f("summary");
$con_side[$db->f("idcat")][$db->f("idside")][public] = $db->f("public");
$con_side[$db->f("idcat")][$db->f("idside")][link] = $sess->url("front_content.php?client=".$client."&lang=".$lang."&idcat=".$db->f("idcat")."&idside=".$db->f("idside")."");
};
Neues Modul waagerechte Subnavigation:
Sourcecode für den Output-Teil des Moduls "waagerechte Subnavigation":
if(count($con_side[$idcat])>1){
echo"<div align=\"center\">
<hr size=\"1\" noshade>
<span class = \"meinfont\">|";
while (list($key) = each($con_side[$idcat])) {
echo" <a href = \"".$con_side[$idcat][$key][link]."\">";
if($con_side[$idcat][$key][idside]==$idside) echo"<b>";
echo " ".$con_side[$idcat][$key][title]." ";
if($con_side[$idcat][$key][idside]==$idside) echo"</b>";
echo "</a> |";
}
echo " </span><hr size=\"1\" noshade>
</div>";
}
Gruß
Detlev
"Wer sich mit PHP auskennt, wird feststellen, dass hier eine 2. Abfrage ist, die auch die Seiten abruft. Diese wird für die Hauptnavigation noch nicht benötigt. Ist aber hilfreich, wenn man eine noch bessere Navigation schaffen will."
-------------------------------------------
Ich habs mal versucht:
(Dieses Modul liefert Links auf die Seiten innerhalb der gleichen Ebene des Strukturbaums)
Also: In die Datei front_content.php der jeweiligen Clients wird folgende Abfrage von Sven reinkopiert
(vor die Zeile mit "if (!$idcatside) {" ):
// Seiten einlesen //
$sql = "SELECT A.idcat, A.idside, A.is_start, B.title, B.summary, C.public FROM $cfgTab_cat_side AS A, $cfgTab_side_lang AS B, $cfgTab_cat_lang AS C, $cfgTab_cat AS D WHERE A.idside=B.idside AND A.idcat=C.idcat AND C.idcat=D.idcat AND B.online='1' AND C.visible='1' AND D.idclient='$client' order by B.title asc";
$db->query($sql);
while($db->next_record()){
$con_side[$db->f("idcat")][$db->f("idside")][idcat] = $db->f("idcat");
$con_side[$db->f("idcat")][$db->f("idside")][idside] = $db->f("idside");
$con_side[$db->f("idcat")][$db->f("idside")][is_start] = $db->f("is_start");
$con_side[$db->f("idcat")][$db->f("idside")][title] = $db->f("title");
$con_side[$db->f("idcat")][$db->f("idside")][summary] = $db->f("summary");
$con_side[$db->f("idcat")][$db->f("idside")][public] = $db->f("public");
$con_side[$db->f("idcat")][$db->f("idside")][link] = $sess->url("front_content.php?client=".$client."&lang=".$lang."&idcat=".$db->f("idcat")."&idside=".$db->f("idside")."");
};
Neues Modul waagerechte Subnavigation:
Sourcecode für den Output-Teil des Moduls "waagerechte Subnavigation":
if(count($con_side[$idcat])>1){
echo"<div align=\"center\">
<hr size=\"1\" noshade>
<span class = \"meinfont\">|";
while (list($key) = each($con_side[$idcat])) {
echo" <a href = \"".$con_side[$idcat][$key][link]."\">";
if($con_side[$idcat][$key][idside]==$idside) echo"<b>";
echo " ".$con_side[$idcat][$key][title]." ";
if($con_side[$idcat][$key][idside]==$idside) echo"</b>";
echo "</a> |";
}
echo " </span><hr size=\"1\" noshade>
</div>";
}
Gruß
Detlev