Hallo ...
Ich habe ein Problem in einem Projekt, in dem ich ein Layout austauschen wollte, gegen ein neues, überarbeitetes.
Es handelt sich um das Standard-Layout. Alle Container sind gleich geblieben, nur tauchen Sie an anderen Stellen auf, und es wurde ein neues Stylsheet angefügt. Zu erst dachte ich, es läge an etwas JavaScript Code in der Siete, aber selbst ohne bekomme ich nach Integration folgende Probleme:
Ich benutze das Modul, welches die 1. und 2/3. Ebene der Navigation getrennt anzeigt, was auch problemlos in anderen Projekten funktioniert.
Zugeorndet in Container4 und (so called) NavMod2 in Container11.
Vorher, alle gut, nachdem ich den Code des Layouts ausgetauscht habe, wird alles ab 2. Ebene nicht mehr angezeigt, und es gibt folgende Meldungen im Log:
[26-Jan-2005 01:00:31] PHP Warning: Invalid argument supplied for foreach() in /srv/reifen-gabel.de/www2/workbench/htdocs/cms/front_content.php(563) : eval()'d code on line 166
[26-Jan-2005 01:00:32] PHP Warning: Invalid argument supplied for foreach() in /srv/reifen-gabel.de/www2/workbench/htdocs/cms/front_content.php(563) : eval()'d code on line 166
[26-Jan-2005 01:00:33] PHP Warning: Invalid argument supplied for foreach() in /srv/reifen-gabel.de/www2/workbench/htdocs/cms/front_content.php(563) : eval()'d code on line 166
[26-Jan-2005 01:10:57] PHP Warning: Invalid argument supplied for foreach() in /srv/reifen-gabel.de/www2/workbench/htdocs/cms/front_content.php(563) : eval()'d code on line 171
[26-Jan-2005 01:11:07] PHP Warning: Invalid argument supplied for foreach() in /srv/reifen-gabel.de/www2/workbench/htdocs/cms/front_content.php(563) : eval()'d code on line 166
[26-Jan-2005 01:11:09] PHP Warning: Invalid argument supplied for foreach() in /srv/reifen-gabel.de/www2/workbench/htdocs/cms/front_content.php(563) : eval()'d code on line 166
Und davon noch viel mehr ... Wenn ich den Code des Layouts wieder durch den alten ersetze, ist wieder alles gut ... !?
Wäre klasse, wenn jemand dazu einen Tipp hätte.
...olli
Nach Layout-Änderung wird 2. Nav-Ebene nicht angezeigt
Ich weiss jetzt nicht, ob man die Module konfigurieren kann, aber wenn, hast Du die Konfiguration der Module nach der Layout-Änderung bestätigt (für die Kategorie/die Artikel)?
Gruß
HerrB
Gruß
HerrB
Bitte keine unaufgeforderten PMs oder E-Mails -> use da Forum!
Newsletter: V4.4.x | V4.6.0-15 (Module, Backend) | V4.6.22+
Standardartikelliste: V4.4.x | V4.6.x
http://www.contenido.org/forum/search.php | http://faq.contenido.org | http://www.communido.net
Newsletter: V4.4.x | V4.6.0-15 (Module, Backend) | V4.6.22+
Standardartikelliste: V4.4.x | V4.6.x
http://www.contenido.org/forum/search.php | http://faq.contenido.org | http://www.communido.net
soweit möglich ...
... habe ich das gemacht.
Dieses verwendete NavMod1, wie ich es nenne, braucht, genau wie das Modul Hauptnavigation nur den entsprechenden Baum, NavMod2 braucht gar nix.
Und die restlichen Module benötigen ja nix .... !?
Dieses verwendete NavMod1, wie ich es nenne, braucht, genau wie das Modul Hauptnavigation nur den entsprechenden Baum, NavMod2 braucht gar nix.
Und die restlichen Module benötigen ja nix .... !?
-- "will code html for food" (cit)
-
- Beiträge: 5478
- Registriert: Di 2. Mär 2004, 21:11
- Wohnort: Halchter, wo sonst? ;-)
- Kontaktdaten:
Re: soweit möglich ...
aehm, was ist das fuer ein Navimodul, das nicht konfiguriert werden muss?OSI hat geschrieben:NavMod2 braucht gar nix.
HauptNav auf 2 Containern
Ich weiss nicht mehr wo ichs gefunden hatte, es tut aber wunderbar ...
1 Modul:
Name: NavMod1
Beschr.: xxx
Input:
Output:
2. Modul
Name: NavMod2
Beschr.: xxx
Input:
nix
Output:
# ENDE !
Und bei dem Navigationsmodul 2 muss nix konfiguriert werden.
Es zeigt bei aktivem Punkt der ersten Ebene einfach die zugehörigen Punkte 2. Ebene in einem eigenen Container irgendwo anders auf der Seite an.
1 Modul:
Name: NavMod1
Beschr.: xxx
Input:
Code: Alles auswählen
/**
* Navigation
*
* INPUT
*
* @autor Jan Lengowski <Jan.Lengowski@4fb.de>
* @copyright four for business AG 2003
*/
?>
<table cellspacing="0" cellpadding="0" cellpadding="4">
<tr>
<td class="text">Baum wählen:</td>
<td>
<select name="CMS_VAR[0]">
<option value="0">-- kein --</option>
<?php
$sql = "SELECT
A.idcat,
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 AND
A.level = '0'
ORDER BY
A.idtree";
$db->query($sql);
while ( $db->next_record() ) {
if ( "CMS_VALUE[0]" == $db->f("idcat") ) {
echo '<option selected="selected" value="'.$db->f("idcat").'">'.$db->f("name").'</option>';
} else {
echo '<option value="'.$db->f("idcat").'">'.$db->f("name").'</option>';
}
}
?>
</select>
</td>
</tr>
</table>
<?php
Code: Alles auswählen
<?php
// template klasse includen
include_once($cfg["path"]["contenido"] . 'classes/class.template.php');
/**
* Array storing alle the
* navigation data
*/
$navitems = array();
// template instanz
$tpl = new Template;
function nav($idcat) {
global $navitems, $client, $lang, $db, $cfg;
//searches for parentid
$sql = "SELECT parentid FROM ".$cfg["tab"]["cat"]." WHERE idcat='$idcat'";
$db->query($sql);
$db->next_record();
$parentid = $db->f("parentid");
// If parentid equals 0 break,
// first level reached.
if($parentid==0){
if($idcat!=1){
$navitems=array();
//search for the idcat where I´m the parent
$sql = "SELECT A.idcat, 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 B.idclient='$client' AND C.idlang='$lang'
AND C.visible='1' AND B.parentid='1' ORDER BY A.idtree";
$db->query($sql);
while ($db->next_record()) {
$navitems[$db->f("idcat")] = array("idcat"=>$db->f("idcat"),
"name"=>$db->f("name"));
}
}
return true;
}
// select idcats on the same level
// they have the same parent id
$sql = "SELECT A.idcat, 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 B.idclient='$client' AND C.idlang='$lang'
AND C.visible='1' AND B.parentid='$parentid' ORDER BY A.idtree";
$db->query($sql);
while ($db->next_record()) {
$tmp_nav[$db->f("idcat")] = array("idcat"=>$db->f("idcat"),
"name"=>$db->f("name"));
}
// Add the old navigation array to the new one,
// because it is an item of the new one on place $idcat
$tmp_nav[$idcat]["sub"] = $navitems;
$navitems = $tmp_nav;
nav($parentid);
}
if(!isset($idcat)){
//set the start idcat
$idcat = 1;
}
//search for the idcat where I´m the parent
$sql = "SELECT A.idcat, 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 B.idclient='$client' AND C.idlang='$lang'
AND C.visible='1' AND B.parentid='$idcat' ORDER BY A.idtree";
$db->query($sql);
while ($db->next_record()) {
$navitems[$db->f("idcat")] = array("idcat"=>$db->f("idcat"),
"name"=>$db->f("name"));
}
nav($idcat);
/**
* array $navitems enthält alle daten
* die für das aufbauen der navigation
* notwendig sind.
*/
echo '<table cellspacing="0" cellpadding="0" border="0" class="nav"><tr><!--NavMod1gehtauf-->';
foreach ($navitems as $key => $data) {
// 1. navi ebene
$tpl->reset();
$tpl->set('d', 'NAME', $data['name']);
$tpl->set('d', 'HREF', $sess->url('front_content.php?idcat='.$data['idcat'].'&client='.$client.'&lang='.$lang));
$tpl->next();
if ($idcat == $data['idcat'] || is_array($data['sub'])) {
$tpl->generate('templates/navfirst_on.html');
} else {
$tpl->generate('templates/navfirst_off.html');
}
} // end foreach
echo '<!--NavMod1gehtzu--><td><img src="images/spacer.gif" width=1 height=1 alt=""></td></tr></table>';
?>
Name: NavMod2
Beschr.: xxx
Input:
nix
Output:
Code: Alles auswählen
<?php
// template klasse includen
include_once($cfg["path"]["contenido"] . 'classes/class.template.php');
/**
* array $navitems enthält alle daten
* die für das aufbauen der navigation
* notwendig sind.
*/
echo '<table cellspacing="0" cellpadding="0" border="0"><!--MavMod2gehtauf-->';
//echo '<tr><tr><td witdth="15"><!--dreck--><img src="images/spacer.gif" width="1" height="10"></td><td></td></tr>';
foreach ($navitems as $key => $data) {
// ------------ 1. navi ebene mit Ausgabe der aktiven Kategorie----------
$tpl->reset();
$tpl->set('d', 'NAME', $data['name']);
$tpl->set('d', 'HREF', $sess->url('front_content.php?idcat='.$data['idcat'].'&client='.$client.'&lang='.$lang));
$tpl->next();
if ($idcat == $data['idcat'] || is_array($data['sub'])) {
$tpl->generate('');
}
if (is_array($data['sub'])) {
foreach ($data['sub'] as $key => $data) {
//---------------- 2. navi ebene ---------------------------
$tpl->reset();
$tpl->set('d', 'NAME', $data['name']);
$tpl->set('d', 'HREF', $sess->url('front_content.php?idcat='.$data['idcat'].'&client='.$client.'&lang='.$lang));
$tpl->next();
if ($idcat == $data['idcat'] || is_array($data['sub'])) {
$tpl->generate('templates/navsecond_on.html');
} else {
$tpl->generate('templates/navsecond_off.html');
}
if (is_array($data['sub'])) {
foreach ($data['sub'] as $key => $data) {
// -------------- 3. navi ebene --------------------
$tpl->reset();
$tpl->set('d', 'NAME', $data['name']);
$tpl->set('d', 'HREF', $sess->url('front_content.php?idcat='.$data['idcat'].'&client='.$client.'&lang='.$lang));
$tpl->next();
if ($idcat == $data['idcat']) {
$tpl->generate('templates/navthird_on.html');
} else {
$tpl->generate('templates/navthird_off.html');
}
} // end foreach
} // end if
} // end foreach
} // end if
} // end foreach
echo '<!--NavMod2gehtzu--><!--</tr>--></table>';
?>
Und bei dem Navigationsmodul 2 muss nix konfiguriert werden.
Es zeigt bei aktivem Punkt der ersten Ebene einfach die zugehörigen Punkte 2. Ebene in einem eigenen Container irgendwo anders auf der Seite an.
-- "will code html for food" (cit)
Für wens interessiert ...
Warum auch immer,
die Module für die geteilte Navigation (siehe oben) mochten es nicht, in einer verschachtelten Tabelle aufzutauchen. Ich habe die Tabelle etwas verschoben, ohne irgendwo in den Template-Konfigurationen oder so etwas zu verändern, und plötzlich tut alles ... !?
Und inzwischen ist es mir fast egal warum, hautsache es tut ....
Ich hatte inzwischen zu dem normalen www Webauftritt des Klienten schon www2 und www3 angelegt, und überall ein contenido installiert und die selben Probleme, und auf einmal gehts, nur wegen dieser Tabellenproblematik ....
die Module für die geteilte Navigation (siehe oben) mochten es nicht, in einer verschachtelten Tabelle aufzutauchen. Ich habe die Tabelle etwas verschoben, ohne irgendwo in den Template-Konfigurationen oder so etwas zu verändern, und plötzlich tut alles ... !?
Und inzwischen ist es mir fast egal warum, hautsache es tut ....
Ich hatte inzwischen zu dem normalen www Webauftritt des Klienten schon www2 und www3 angelegt, und überall ein contenido installiert und die selben Probleme, und auf einmal gehts, nur wegen dieser Tabellenproblematik ....
-- "will code html for food" (cit)