Seite 7 von 8
Verfasst: Mi 23. Jul 2008, 10:23
von nicnac
hallo.
dank dir. ich habe mal den code angepaßt, da fehlte eine klammer
Code: Alles auswählen
$output = $navigation->showNavigation(2);
if (strlen(trim($output)) > 0) {
echo '<ul>';
echo $output;
echo '</ul>';
}
nur interessanterweise gibt er mir jetzt nur die Variable $output aus, das echo davor und danach interessiert ihn gar nicht. Sprich ich habe jetzt an dieser Stelle eine unformatierte Liste...
Das mit dem anderen Navigationsmodul gestaltet sich wahrscheinlich etwas schwierig. ich habe nämlich, da ich für die Haupt- und erste Subebene ne Dropdownnavi nehme 2 Module verbunden. Also die Dropdownnavi mit der hier. Dem Kunden ist natürlich erst als wir fast fertig waren eingefallen, dass er bei Sub SubPunkten immer das Wort Beispiele als erstes zu stehen haben will. Hm, immer diese Extrawürste

und unser Freelancer ist im Urlaub *grrr* und ich hätte gern welchen
Eine Idee?
Verfasst: Mi 23. Jul 2008, 10:29
von kummer
das kann eigentlich nicht sein. ich fürchte, die methode showNavigtion gibt bei dir direkt eine ausgabe an den browser, statt eine rückgabe. das würde das dann erklären.
in diesem fall machst du folgendes:
1. gib der methode showNavigation einen zweiten paramter, welchen du standardmässig auf false setzt. also so...
2. dann speicherst du alle ausgaben innerhalb dieser methode in eine variablle (z.B.. $out), prüfst am schluss, ob $return = true und machst einen return der variablen $out. andernfalls machst du ein echo.
3. dann fügst du bei der ausgabe (also im modul) beim aufruf der methode showNavigation als zweiten parameter true an.
ich hoffe, es ist klar, wie das ganze zu verstehen ist. die methode showNavigation findest du in der klasse, die du einbindest.
Super Modul
Verfasst: Di 5. Aug 2008, 08:22
von speedmaster
Hallo, genau so ein Modul habe ich gesucht.
Jedoch hätte ich da noch eine Frage dazu.
Wie bekomme ich es gebacken, die aktiven Links zu formatieren?
funktioniert nicht.

Verfasst: Di 5. Aug 2008, 11:51
von speedmaster
Hat sich erledigt.
Wer lesen kann ist deutlich im Vorteil. Hatte ich komplett überlesen.
Folgendes muss im Output ausgetauscht werden:
Ist
Code:
if ($this->isSelected($next)) {
echo $this->beforeSelected;
} else {
echo $this->beforeEach;
}
echo '<a href="'.$link.'">'.$this->navigationTree[$parentId][$next]['name'].'</a>';
$first = false;
$output = true;
}
Soll
Code:
if ($this->isSelected($next)) {
echo $this->beforeSelected;
echo '<div id="selectednav">'.'<a href="'.$link.'">'.$this->navigationTree[$parentId][$next]['name'].'</a>'.'</div>';
$first = false;
$output = true;
} else {
echo $this->beforeEach;
echo '<a href="'.$link.'">'.$this->navigationTree[$parentId][$next]['name'].'</a>';
$first = false;
$output = true;
}
}
Dann noch das CSS
Code:
#selectednav { display: inline; }
definieren und fertig.

selectednav für jede ebene separat ansprechen?
Verfasst: Do 14. Aug 2008, 13:43
von speedmaster
Hallo zusammen,
wie kann ich jede einzelne Ebene der Navigation separat mit selectednav ansprechen?
z.B.
nav_0#selectednav | für die erste Ebene
nav_1#selectednav | für die zweite Ebene
nav_2#selectednav | für die dritte Ebene
nav_3#selectednav | für die vierte Ebene
usw..
Code: Alles auswählen
Code:
if ($this->isSelected($next)) {
echo $this->beforeSelected;
echo '<div id="selectednav">'.'<a href="'.$link.'">'.$this->navigationTree[$parentId][$next]['name'].'</a>'.'</div>';
$first = false;
$output = true;
} else {
echo $this->beforeEach;
echo '<a href="'.$link.'">'.$this->navigationTree[$parentId][$next]['name'].'</a>';
$first = false;
$output = true;
}
}
Verfasst: Fr 15. Aug 2008, 17:34
von kummer
mit dieser navi kannst du genau das machen:
http://forum.contenido.org/viewtopic.ph ... universell
gruss,
andreas
Verfasst: Fr 15. Aug 2008, 19:07
von speedmaster
Vielen Dank, werde ich morgen gleich probieren.
Verfasst: Fr 16. Jan 2009, 09:02
von blingbling
Hab nun das versucht in mein cms einzubauen, jedoch gibt er nichts aus bis auf ein "-"
So schaut mein OUTPUT im Modul aus:
Code: Alles auswählen
<?php
/**
* $Revision: 1.22 $
* $Source: D:/cvs/cvsrepo/test/PPI_Nade/module/mainNavigation/output.php,v $
* $Date: 2005/11/28 10:20:39 $
*/
/**
* navigation
* @author Andreas Kummer
* @copyright Copyright © 2005 w3concepts AG
*/
if (!class_exists('navigation')) {
class navigation {
/**
* Konstruktor der Klasse.
* @param Integer Primärschlüssel der Startkategorie.
*/
function navigation($startId) {
global $client, $lang, $idcat;
$this->startId = $startId;
$this->client = $client;
$this->lang = $lang;
$this->idcat = $idcat;
$this->before = '';
$this->beforeEach = '';
$this->between = '';
$this->after = '';
$this->db = new DB_Contenido();
$this->setStartIds();
$this->getNavigation();
}
/**
* Auslesen der Navigationsstruktur aus der Datenbank.
*/
function getNavigation() {
global $cfg;
if ($this->startId != $this->id[0]) {
/*
* Wenn die StartId nicht identisch ist mit der höchsten Ebene der
* aktuell selektierten Kategorie, dann liegt die gewählte Kategorie
* folgerichtig ausserhalb des für die Navigation gewählten Baumes.
* In diesem Fall ist nur die Hauptnavigation einzublenden.
*/
$this->id[0] = $this->startId;
for ($i = 1; $i <= 3; $i++) {
$this->id[$i] = -1;
}
}
$this->db->query("" .
"SELECT " .
" a.idcat, " .
" a.parentid, " .
" a.preid, " .
" a.postid, " .
" a.parentid, " .
" b.visible, " .
" b.name, " .
" b.idlang " .
" FROM {$cfg['tab']['cat']} AS a " .
"LEFT JOIN {$cfg['tab']['cat_lang']} AS b ON a.idcat = b.idcat " .
"WHERE " .
" a.idclient = {$this->client} " .
" AND (" .
" a.parentid = {$this->id[0]} " .
" OR a.parentid = {$this->id[1]} " .
" OR a.parentid = {$this->id[2]} " .
" OR a.parentid = {$this->id[3]} " .
" ) " .
"");
$this->navigationTree = array();
$this->firstId[0] = 0;
$this->firstId[1] = 0;
$this->firstId[2] = 0;
$this->firstId[3] = 0;
while ($this->db->next_record()) {
for ($i = 0; $i <= 3; $i++) {
if (($this->firstId[$i] == 0 && $this->db->f('parentid') == $this->id[$i] && $this->db->f('preid') == 0 && $this->db->f('idlang') == $this->lang) || ($this->firstId[$i] == 0 && $this->db->f('parentid') == $this->id[$i] && $this->db->f('preid') == 0 && $this->db->f('idlang') == null)) {
$this->firstId[$i] = $this->db->f('idcat');
}
}
$this->navigationTree[$this->db->f('parentid')][$this->db->f('idcat')] = array('preid'=>$this->db->f('preid'), 'postid'=>$this->db->f('postid'), 'visible'=>$this->db->f('visible'), 'name'=>$this->db->f('name'), 'idlang'=>$this->db->f('idlang'));
}
}
/**
* Ausgabe der Navigation an die Standardausgabe.
* @param String Navigationstyp
*/
function showNavigation($type, $next = -1) {
static $first;
static $output = false;
if ($next == 0) {
return false;
}
if ($next == -1) {
echo $this->before;
$next = $this->firstId[$type];
$first = true;
}
$parentId = $this->id[$type];
$link = 'front_content.php?idcat='.$next;
if ($this->navigationTree[$parentId][$next]['visible'] == 1 && $this->navigationTree[$parentId][$next]['idlang'] == $this->lang) {
if (!$first) {
echo $this->between;
}
if ($this->isSelected($next)) {
echo $this->beforeSelected;
} else {
echo $this->beforeEach;
}
echo '<a href="'.$link.'">'.$this->navigationTree[$parentId][$next]['name'].'</a>';
$first = false;
$output = true;
} elseif (!$output && $this->navigationTree[$parentId][$next]['postid'] == 0) {
/*
* Die Navigation enthält nichts.
*/
echo ' ';
}
$this->showNavigation($type, $this->navigationTree[$parentId][$next]['postid']);
}
/**
* Ausgabe vor der Navigation
* @param String Ausgabe vor der Navigation.
*/
function before($text) {
$this->before = $text;
}
/**
* Ausgabe vor jedem Eintrag
* @param String Ausgabe vor jedem Eintrag.
*/
function beforeEach($text) {
$this->beforeEach = $text;
}
/**
* Ausgabe vor jedem selektierten Menueintrag
* @param String Ausgabe vor jedem selektierten Menueintrag.
*/
function beforeSelected($text) {
$this->beforeSelected = $text;
}
/**
* Ausgabe zwischen zwei Hauptmenupunkten
* @param String Ausgabe zwischen zwei Hauptmenupunkten.
*/
function between($text) {
$this->between = $text;
}
/**
* Ausgabe nach der Navigation
* @param String Ausgabe nach der Navigation.
*/
function after($text) {
$this->after = $text;
}
/**
* Gibt das Level der Kategorie zurück.
* @param Integer Primärschlüssel der Kategorie.
* @return Integer Level der spezifizierten Kategorie.
*/
function getLevel($idcat) {
global $cfg;
if (empty($idcat)) {
return 0;
}
$this->db->query("" .
"SELECT level FROM {$cfg['tab']['cat_tree']} " .
"WHERE " .
" idcat = $idcat" .
"");
if ($this->db->next_record()) {
return $this->db->f('level');
} else {
return 0;
}
}
/**
* Gib die Tiefe relativ zum Hauptmenu an.
* @param Integer Primärschlüssel der Kategorie
* @return Integer Level relativ zum Hauptmenu
*/
function getNetLevel($idcat) {
return $this->getLevel($idcat) - $this->getLevel($this->startId);
}
/**
* Ermittlung des jeweils ersten Kategorieeintrages jeder Ebene. Die
* Speicherung dieser Daten erfolgt in das Klassenattribut id.
*/
function setStartIds() {
$id = $this->idcat;
$level = $this->getNetLevel($id);
$this->id[$level] = $id;
while ($level > 0) {
$this->id[$level-1] = $this->getParentId($id);
$id = $this->id[$level-1];
$level = $this->getNetLevel($id);
}
if (empty($this->id)) {
$this->id[0] = $this->startId;
}
for ($i = 1; $i <= 3; $i++) {
if (empty($this->id[$i])) {
$this->id[$i] = -1;
}
}
ksort($this->id);
}
/**
* Ermittlung des Elternelementes der Kategorie mit dem Primärschlüssel
* idcat
* @param Integer Primärschlüssel des Kindelementes, dessen Elternelement
* ermittelt werden soll.
* @return Integer Primärschlüssel des Elternelementes.
*/
function getParentId($idcat) {
global $cfg;
$this->db->query("" .
"SELECT parentid FROM {$cfg['tab']['cat']} " .
"WHERE " .
" idcat = $idcat " .
"");
if ($this->db->next_record()) {
return $this->db->f('parentid');
} else {
return 0;
}
}
/**
* Anzeige, ob eine Navigationsebene Elemente enthält oder nicht.
* @param Integer Navigationsstufe.
* @return Boolean True, wenn die Navigationsstufe leer ist (keine Elemente
* enhält). Sonst false.
*/
function navigationEmpty($level) {
if ($this->firstId[$level] == 0) {
return true;
}
return false;
}
/**
* Anzeige, ob eine Kategorie selektiert ist oder nicht. Eine Kategorie gilt
* als selektiert, wenn sie die aktuelle Kategorie ist oder ein direktes
* oder indirektes Elternelement der aktuellen Kategorie.
* @param Integer Primärschlüssel der Kategorie, deren Status gefragt ist.
* @return Boolean True, wenn die gefragte Kategorie mit der aktuellen
* Kategorie übereinstimmt oder ein direktes oder indirektes Elternelement
* der aktuellen Kategorie darstellt.
*/
function isSelected($idcat) {
return in_array($idcat, $this->id);
}
}
}
$navigation = new navigation("CMS_VALUE[0]");
$navigation->before('-');
$navigation->between(' | ');
$navigation->beforeEach('_');
$navigation->beforeSelected('+');
$navigation->after('</h1>');
$navigation->showNavigation(0);
?>
Alles was er ausgibt ist :
Jemand ne ahnung, wodran es liegt?
Verfasst: Mo 26. Jan 2009, 15:59
von ivolein
Hallo,
ich benützte die Splitted-Navigation unter 4.8. und es funktioniert gut.
Ich habe nur ein Problem...
Ich habe mehrere geschüzte Seiten die abhänging vom User angezeigt werden sollen.
Die splitted-Navigation zeigt mir aber alle geschützen Bereiche an und nicht nur die für den jeweiligen Benutzer freigegebenen.
Wie kann man das in der splitted-Nav. noch einstellen ?
Danke...
Generelle Verständnisfrage
Verfasst: So 15. Feb 2009, 08:11
von birke
Ich verstehe das leider überhaupt nicht wie ich dieses Modul anlegen muss.
Wenn ich es richtig verstehe, muss ich einmal die Navigation als Hauptmodul an sich anlegen. Diese hat einen Input und Output im Modul und ist vom Typ "Navigation"?
Hauptmodul - Input
Code: Alles auswählen
?><?
/**
* $Revision: 1.7 $
* $Source: D:/cvs/cvsrepo/test/PPI_Nade/module/articleList/input.php,v $
* $Date: 2005/11/25 17:41:12 $
*/
/**
* chooseTree
* @author Andreas Kummer
* @copyright Copyright © 2005 w3concepts AG
*/
if (!class_exists('chooseTree')) {
class chooseTree {
function chooseTree($selected, $index) {
global $lang, $client;
$this->selected = $selected;
$this->index = $index;
$this->lang = $lang;
$this->client = $client;
$this->db = new DB_Contenido();
$this->queryStructure();
$this->outputInterface();
}
function queryStructure() {
global $cfg;
$this->db->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 = '{$this->lang}' " .
" AND b.idclient = '{$this->client}' " .
" AND c.visible=1 " .
"ORDER BY " .
" a.idtree" .
"");
$this->structure = array();
while ($this->db->next_record()) {
$this->structure[$this->db->f('idcat')] = array('level'=>$this->db->f('level'), 'name'=>$this->db->f('name'));
}
}
function outputInterface() {
/*
* Tabellenanfang ausgeben
*/
echo "<table cellspacing=\"0\" cellpadding=\"10\" border=\"0\">";
/*
* Zeilenanfang ausgeben
*/
echo "<tr><td>Baum wählen:</td><td>";
/*
* Select-Feld ausgeben
*/
echo $this->getSelect($this->structure, $this->index);
/*
* Zeilenende ausgeben
*/
echo "</td></tr>";
/*
* Tabellenende ausgeben
*/
echo "</table>";
}
function getSelect($structure, $name) {
$returnValue = '<select size="1" name="'.$name.'" class="text_medium">'."\n";
foreach ($structure as $idcat => $item) {
if ($idcat == $this->selected) {
$selected = ' selected = "selected"';
} else {
$selected = '';
}
$spaces = "|";
for ($i = 0; $i < $item['level']; $i ++) {
$spaces = $spaces . "--";
}
$spaces .= ">";
$returnValue .= '<option value="'.$idcat.'"'.$selected.'>'.$spaces.$item['name'].'</option>';
}
$returnValue .= '</select>'."\n";
return $returnValue;
}
}
}
$chooseTree = new chooseTree("CMS_VALUE[0]", "CMS_VAR[0]");
Hauptmodul - Output
Code: Alles auswählen
<?php
/**
* $Revision: 1.22 $
* $Source: D:/cvs/cvsrepo/test/PPI_Nade/module/mainNavigation/output.php,v $
* $Date: 2005/11/28 10:20:39 $
*/
/**
* navigation
* @author Andreas Kummer
* @copyright Copyright © 2005 w3concepts AG
*/
if (!class_exists('navigation')) {
class navigation {
/**
* Konstruktor der Klasse.
* @param Integer Primärschlüssel der Startkategorie.
*/
function navigation($startId) {
global $client, $lang, $idcat;
$this->startId = $startId;
$this->client = $client;
$this->lang = $lang;
$this->idcat = $idcat;
$this->before = '';
$this->beforeEach = '';
$this->between = '';
$this->after = '';
$this->db = new DB_Contenido();
$this->setStartIds();
$this->getNavigation();
}
/**
* Auslesen der Navigationsstruktur aus der Datenbank.
*/
function getNavigation() {
global $cfg;
if ($this->startId != $this->id[0]) {
/*
* Wenn die StartId nicht identisch ist mit der höchsten Ebene der
* aktuell selektierten Kategorie, dann liegt die gewählte Kategorie
* folgerichtig ausserhalb des für die Navigation gewählten Baumes.
* In diesem Fall ist nur die Hauptnavigation einzublenden.
*/
$this->id[0] = $this->startId;
for ($i = 1; $i <= 3; $i++) {
$this->id[$i] = -1;
}
}
$this->db->query("" .
"SELECT " .
" a.idcat, " .
" a.parentid, " .
" a.preid, " .
" a.postid, " .
" a.parentid, " .
" b.visible, " .
" b.name, " .
" b.idlang " .
" FROM {$cfg['tab']['cat']} AS a " .
"LEFT JOIN {$cfg['tab']['cat_lang']} AS b ON a.idcat = b.idcat " .
"WHERE " .
" a.idclient = {$this->client} " .
" AND (" .
" a.parentid = {$this->id[0]} " .
" OR a.parentid = {$this->id[1]} " .
" OR a.parentid = {$this->id[2]} " .
" OR a.parentid = {$this->id[3]} " .
" ) " .
"");
$this->navigationTree = array();
$this->firstId[0] = 0;
$this->firstId[1] = 0;
$this->firstId[2] = 0;
$this->firstId[3] = 0;
while ($this->db->next_record()) {
for ($i = 0; $i <= 3; $i++) {
if (($this->firstId[$i] == 0 && $this->db->f('parentid') == $this->id[$i] && $this->db->f('preid') == 0 && $this->db->f('idlang') == $this->lang) || ($this->firstId[$i] == 0 && $this->db->f('parentid') == $this->id[$i] && $this->db->f('preid') == 0 && $this->db->f('idlang') == null)) {
$this->firstId[$i] = $this->db->f('idcat');
}
}
$this->navigationTree[$this->db->f('parentid')][$this->db->f('idcat')] = array('preid'=>$this->db->f('preid'), 'postid'=>$this->db->f('postid'), 'visible'=>$this->db->f('visible'), 'name'=>$this->db->f('name'), 'idlang'=>$this->db->f('idlang'));
}
}
/**
* Ausgabe der Navigation an die Standardausgabe.
* @param String Navigationstyp
*/
function showNavigation($type, $next = -1) {
static $first;
static $output = false;
if ($next == 0) {
return false;
}
if ($next == -1) {
echo $this->before;
$next = $this->firstId[$type];
$first = true;
}
$parentId = $this->id[$type];
$link = 'front_content.php?idcat='.$next;
if ($this->navigationTree[$parentId][$next]['visible'] == 1 && $this->navigationTree[$parentId][$next]['idlang'] == $this->lang) {
if (!$first) {
echo $this->between;
}
if ($this->isSelected($next)) {
echo $this->beforeSelected;
} else {
echo $this->beforeEach;
}
echo '<a href="'.$link.'">'.$this->navigationTree[$parentId][$next]['name'].'</a>';
$first = false;
$output = true;
} elseif (!$output && $this->navigationTree[$parentId][$next]['postid'] == 0) {
/*
* Die Navigation enthält nichts.
*/
echo ' ';
}
$this->showNavigation($type, $this->navigationTree[$parentId][$next]['postid']);
}
/**
* Ausgabe vor der Navigation
* @param String Ausgabe vor der Navigation.
*/
function before($text) {
$this->before = $text;
}
/**
* Ausgabe vor jedem Eintrag
* @param String Ausgabe vor jedem Eintrag.
*/
function beforeEach($text) {
$this->beforeEach = $text;
}
/**
* Ausgabe vor jedem selektierten Menueintrag
* @param String Ausgabe vor jedem selektierten Menueintrag.
*/
function beforeSelected($text) {
$this->beforeSelected = $text;
}
/**
* Ausgabe zwischen zwei Hauptmenupunkten
* @param String Ausgabe zwischen zwei Hauptmenupunkten.
*/
function between($text) {
$this->between = $text;
}
/**
* Ausgabe nach der Navigation
* @param String Ausgabe nach der Navigation.
*/
function after($text) {
$this->after = $text;
}
/**
* Gibt das Level der Kategorie zurück.
* @param Integer Primärschlüssel der Kategorie.
* @return Integer Level der spezifizierten Kategorie.
*/
function getLevel($idcat) {
global $cfg;
if (empty($idcat)) {
return 0;
}
$this->db->query("" .
"SELECT level FROM {$cfg['tab']['cat_tree']} " .
"WHERE " .
" idcat = $idcat" .
"");
if ($this->db->next_record()) {
return $this->db->f('level');
} else {
return 0;
}
}
/**
* Gib die Tiefe relativ zum Hauptmenu an.
* @param Integer Primärschlüssel der Kategorie
* @return Integer Level relativ zum Hauptmenu
*/
function getNetLevel($idcat) {
return $this->getLevel($idcat) - $this->getLevel($this->startId);
}
/**
* Ermittlung des jeweils ersten Kategorieeintrages jeder Ebene. Die
* Speicherung dieser Daten erfolgt in das Klassenattribut id.
*/
function setStartIds() {
$id = $this->idcat;
$level = $this->getNetLevel($id);
$this->id[$level] = $id;
while ($level > 0) {
$this->id[$level-1] = $this->getParentId($id);
$id = $this->id[$level-1];
$level = $this->getNetLevel($id);
}
if (empty($this->id)) {
$this->id[0] = $this->startId;
}
for ($i = 1; $i <= 3; $i++) {
if (empty($this->id[$i])) {
$this->id[$i] = -1;
}
}
ksort($this->id);
}
/**
* Ermittlung des Elternelementes der Kategorie mit dem Primärschlüssel
* idcat
* @param Integer Primärschlüssel des Kindelementes, dessen Elternelement
* ermittelt werden soll.
* @return Integer Primärschlüssel des Elternelementes.
*/
function getParentId($idcat) {
global $cfg;
$this->db->query("" .
"SELECT parentid FROM {$cfg['tab']['cat']} " .
"WHERE " .
" idcat = $idcat " .
"");
if ($this->db->next_record()) {
return $this->db->f('parentid');
} else {
return 0;
}
}
/**
* Anzeige, ob eine Navigationsebene Elemente enthält oder nicht.
* @param Integer Navigationsstufe.
* @return Boolean True, wenn die Navigationsstufe leer ist (keine Elemente
* enhält). Sonst false.
*/
function navigationEmpty($level) {
if ($this->firstId[$level] == 0) {
return true;
}
return false;
}
/**
* Anzeige, ob eine Kategorie selektiert ist oder nicht. Eine Kategorie gilt
* als selektiert, wenn sie die aktuelle Kategorie ist oder ein direktes
* oder indirektes Elternelement der aktuellen Kategorie.
* @param Integer Primärschlüssel der Kategorie, deren Status gefragt ist.
* @return Boolean True, wenn die gefragte Kategorie mit der aktuellen
* Kategorie übereinstimmt oder ein direktes oder indirektes Elternelement
* der aktuellen Kategorie darstellt.
*/
function isSelected($idcat) {
return in_array($idcat, $this->id);
}
}
}
$navigation = new navigation("CMS_VALUE[0]");
$navigation->between('<img src="/cms/images/templateImages/spacer.png" width="10" height="1"/>');
$navigation->beforeEach('<img src="/cms/images/templateImages/spacer.png" width="10" height="1"/>');
$navigation->beforeSelected('<img src="/cms/images/templateImages/pfeilWeiss.png"/>');
$navigation->showNavigation(0);
?>
Dann lege ich für die Ausgabe jedes Naviteils (Hauptnavi / Subnavi 1 / Subnavi 2 / ...) jeweils ein weiteres Modul an, das nur einen Output enthält. Dieses Modul ist vom Typ "Navigation"?
Modul 2 - Output
0, für Ebene 1
1, für Ebene 2
...
Da sieht meine Contenido-Modul Ampel leider rot. Oder funktioniert dieses Modul in der aktuellen 4.8.11 nicht mehr?
Ganz praktisch wäre es natürlich, wenn man solche Module als XML bereitstellen würde, dann müsste man es nur noch importieren.

Re: neues modul :: splittedNavigation
Verfasst: So 22. Feb 2009, 02:23
von GaMbIt_
Nur mal so was mir auf den ersten Blick einfällt..
Schreib doch mal anstelle von ?><? ein ?><?php
Re: neues modul :: splittedNavigation
Verfasst: Mo 23. Feb 2009, 09:13
von kummer
und am schluss dasselbe. neuerdings akzeptiert contenido keine short-eingangs- und ausgangstags mehr. also immer <?php
im eingabebereich kann man diese auch ganz weglassen. ich habe diese in der regel in meinen modulen drin, damit mein editor richtig funktioniert. im eingabebereich des modules benötigt man die eigentlich nicht.
Re: neues modul :: splittedNavigation
Verfasst: Mo 23. Feb 2009, 10:23
von birke
Inzwischen habe ich es hinbekommen. Es liegt an etwas ganz anderem: Der Typ ist nicht "Navigation" sondern "Benutzerdefiniert" oder "Content".
Trotz allem wären genauere Angaben für die Implementierung eines Moduls manchmal recht hilfreich. Vor allem für Anfänger wie mich.

Daher finde ich es sehr praktisch, wenn Module direkt als XML Datei angeboten werden. Dann kann eigentlich nichts schief gehen.
Gruß, Birke
Re: neues modul :: splittedNavigation
Verfasst: Mo 23. Feb 2009, 14:56
von GaMbIt_
kummer hat geschrieben:und am schluss dasselbe. neuerdings akzeptiert contenido keine short-eingangs- und ausgangstags mehr. also immer <?php
Ich würde fast behaupten dass das an den Einstellungen von PHP liegt...
short_open_tag = false
Re: neues modul :: splittedNavigation
Verfasst: Mo 23. Feb 2009, 15:06
von kummer
GaMbIt_ hat geschrieben:kummer hat geschrieben:und am schluss dasselbe. neuerdings akzeptiert contenido keine short-eingangs- und ausgangstags mehr. also immer <?php
Ich würde fast behaupten dass das an den Einstellungen von PHP liegt...
short_open_tag = false
ich hätte angenommen, es liegt an contenido. funktioniert hat mein code nämlich auch so. dachte ich mindestens. aber ich kann mich auch irren. wenn man es ordentlich macht, ist man jedoch immer auf der sicheren seite...
