Hab bisher Etomite (etomite.org) benutzt, aber contenido hat ein paar features die es echt reizvoll macht. Aber nach der Installation bekomme ich eine dynamische navigation nicht ans laufen.
Folgender Thread sagt eigentlich schon alles:
http://contenido.org/forum/viewtopic.php?t=13547
Allerdings endet der Strang bei der Hilfsnavigation und nicht bei der Hauptnavi.
Mit reicht zwar die Hilfnavigation als Hauptnavigation, allerdings bekomme ich immer die Überkategorien angezeigt, und nicht die Dokumente innerhalb des im Backend angewählten Dokumenten-Astes
Der Navi-Baum sieht wie folgt aus:
Hauptnavi
- Home
- Produkte
- Leistungen
etc.
Unternavigation
- Impressum
- Kontakt
Bekomme aber über das Modul nur die Ausgabe Hauptnavi - Unternavigation, obwohl ich es im Backend richtig als Hauptnavigation aktiviert hab. Von Etomite kannte ich das bisher nur so, dass man im Modul (dort Snippet) die ID des Überdokumentes Angeben konnte.
Das Snippet ist zwar etwas erweitert worden.
INPUT Keine Änderungen
Code: Alles auswählen
// selected category
$selected = "CMS_VALUE[0]";
echo "<table cellspacing=\"0\" cellpadding=\"10\" border=\"0\">
<tr valign=\"top\">
<td>Kategorie wählen:</td>
<td>
<select name=\"CMS_VAR[0]\">";
if($selected!="0" && $selected!=""){
echo"<option value=\"0\">--- kein ---</option>";
}else{
echo"<option selected=\"selected\" value=\"0\">--- kein ---</option>";
}
// fetch all categorys
$query = "SELECT A.idcat, A.level, C.name FROM ".$cfg["tab"]["cat_tree"]." AS A, ".
$cfg["tab"]["cat"]." AS B, ".$cfg["tab"]["cat_lang"]." AS C WHERE A.idcat=B.idcat ".
"AND B.idcat=C.idcat AND C.idlang='$lang' AND B.idclient='$client' ".
"AND C.visible=1 ORDER BY A.idtree";
// execute query
$db->query($query);
// loop result and build the options
while ($db->next_record()) {
// indent spacer
$spaces = "|";
// how many levels
$levels = $db->f("level");
for ($i = 0; $i < $levels; $i ++) {
// add 2 spaces for every level
$spaces = $spaces . "--";
} // end for
$spaces .= ">";
if ($selected == $db->f("idcat")) {
// selected category
echo "<option selected=\"selected\" value=\"". $db->f("idcat") ."\">". $spaces . $db->f("name") ."</option>";
} else {
// category
echo "<option value=\"". $db->f("idcat") ."\">". $spaces . $db->f("name") ."</option>";
} // end if
} // end while
echo " </select>";
echo " </td>
</tr>
</table>";
Allerdings dürfte das für die Ausgabe unerheblich sein.
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname : Hilfsnavigation
* Author(s) : Andreas Lindner
* Copyright : Contenido - four for business, Andreas Lindner
* Created : 05.08.2005
************************************************/
cInclude("frontend", "includes/functions.navigation.php");
cInclude('classes', 'class.template.php');
$catStart = "CMS_VALUE[0]";
if(($catStart=='')||($catStart=='0')){
$cApiClient = new cApiClient($client);
$catStart= $cApiClient->getProperty('navigation', 'idcat_hilfsnavi');
}
if(!is_object($oClient)) {
$oClient = new cApiClient($client);
}
$navigation = array();
$navigation = createNavigationArray($catStart, $db);
echo '<ul id="navi">';
echo '<li><img src="images/navi_flaeche.gif" alt="Lückenfüller" width="100%" height="75" /></li>';
echo '<li><hr/></li>';
if (count($navigation) > 0) {
foreach ($navigation as $key => $data) {
echo '<li><a href="'.$sess->url('front_content.php?idcat='.$data['idcat']).'">'.$data['name'].'</a></li>';
}
}
echo '<li><hr/></li>';
echo '<li><img src="images/navi_flaeche.gif" alt="Lückenfüller" width="100%" height="75" /></li>';
echo '</ul>'
?>
Danke schonmal