ich frickle seit einiger Zeit an dem Problem rum, daß Produkttabellen im neuen Layout einer Site unsichtbar werden, sowie man im Backend "Speichern" klickt. Und zwar ist es egal, ob die Tabelle noch aus dem bisherigen Content kommt oder gerade neu über das Backend (mit htmlArea3) angelegt wurde.
Ergo vermutete ich eine Interferenz zwischen der HTML-Struktur des Contenido-Backends und der meines Layouts. Und habe etwas im Aufbau zweier Module gefunden, daß m.E. anders sein sollte.
Kandidat #1: CMS_HTMLHEAD
So sieht das Modul in Contenido 4.4.4 aus:
Code: Alles auswählen
/**
* CMS_HTMLHEAD
*/
$tmp = $a_content['CMS_HTMLHEAD'][$val];
$tmp = urldecode($tmp);
$tmp = AddSlashes(AddSlashes($tmp));
$tmp = str_replace("\\\'","'",$tmp);
if ($edit) {
$before="<div id=\"HTMLHEAD_".$db->f("idtype")."_".$val."\" onFocus=\"this.style.border='1px solid #bb5577'\"".
" onBlur=\"this.style.border='1px dashed #bfbfbf'\" style=\"border:1px dashed #bfbfbf\" contentEditable=\"true\">";
$editbutton = "</div><a href=\"javascript:setcontent('$idartlang','".$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTMLHEAD&typenr=$val")."')\">
<img src=\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithead.gif\" border=\"0\"></a>
<a href=\"javascript:setcontent('$idartlang','0')\"><img src=\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_speichern.gif\" border=\"0\"></a>";
$editbutton = AddSlashes(AddSlashes($editbutton));
$editbutton = str_replace("\\\'","'",$editbutton);
$before= AddSlashes(AddSlashes($before));
$before = str_replace("\\\'","'",$before);
if ($tmp == "") {
$tmp = " ";
}
$tmp = $before.$tmp.$editbutton;}
Code: Alles auswählen
<tr>
<td><h2 class="header2">CMS_CONTAINER[5]</h2></td>
</tr>
Im Output des Backends sieht der Quelltext dann so aus:
Code: Alles auswählen
<tr>
<td><h2 class="header2"><div id="HTMLHEAD_1_1" onFocus="this.style.border='1px solid #bb5577'" onBlur="this.style.border='1px dashed #bfbfbf'" style="border:1px dashed #bfbfbf" contentEditable="true">Estudio</div><a href="javascript:setcontent('32','front_content.php?action=10&idcat=33&idart=32&idartlang=32&type=CMS_HTMLHEAD&typenr=1&contenido=40fdda357e2f2b062d16623e068c8d30')">
<img src="http://localhost/contenido2/contenido/images/but_edithead.gif" border="0"></a>
<a href="javascript:setcontent('32','0')"><img src="http://localhost/contenido2/contenido/images/but_speichern.gif" border="0"></a></h2></td>
</tr>
Nicht funktioniert es hingegen bei
Kandidat #2: CMS_HTML
Auch dieses Modul produziert ein <div>...</div> an der falschen Stelle und ich vermute, daß dies dazu führt, daß meine einfache Produkttabelle nicht mehr angezeigt werden kann.
Code des Moduls:
Code: Alles auswählen
/**
* CMS_HTML
*/
$tmp = $a_content['CMS_HTML'][$val];
$tmp = urldecode($tmp);
$tmp = AddSlashes(AddSlashes($tmp));
$tmp = str_replace("\\\'","'",$tmp);
if ($edit) {
$before="<div id=\"HTML_".$db->f("idtype")."_".$val."\" onFocus=\"this.style.border='1px solid #bb5577'\"".
" onBlur=\"this.style.border='1px dashed #bfbfbf'\" style=\"border:1px dashed #bfbfbf\" contentEditable=\"true\" >";
$editbutton = "</div><a href=\"javascript:setcontent('$idartlang','".$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTML&typenr=$val&lang=$lang")."')\">
<img src=\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithtml.gif\" border=\"0\"></a>
<a href=\"javascript:setcontent('$idartlang','0')\"><img src=\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_speichern.gif\" border=\"0\"> </a>";
$editbutton = AddSlashes(AddSlashes($editbutton));
$editbutton = str_replace("\\\'","'",$editbutton);
$before= AddSlashes(AddSlashes($before));
$before = str_replace("\\\'","'",$before);
if ($tmp == "") {
$tmp = " ";
}
$tmp = $before.$tmp.$editbutton;}
Code: Alles auswählen
<tr>
<td>
<table class="produkttabelle" cellspacing="1" cellpadding="3" rules="all" frame="void" bordercolor="#804000"> CMS_CONTAINER[6]
</td></tr></table>
Code: Alles auswählen
<tr>
<td>
<table class="produkttabelle" cellspacing="1" cellpadding="3" rules="all" frame="void" bordercolor="#804000"> <div id="HTML_2_1" onFocus="this.style.border='1px solid #bb5577'" onBlur="this.style.border='1px dashed #bfbfbf'" style="border:1px dashed #bfbfbf" contentEditable="true" ><tr>
<th width="14%">Produkt</th>
<th>Beschreibung</th>
<th width="14%">Bild</th></tr>
<tr>
<td vAlign=top width=295>ECO-RONDA</td></td>
<td class=bild>Decke: Pinie gesperrt; Boden/Zargen: Mahagoni; Griffbrett: Padouk; Finish: seidenmatt</td></tr>
<tr>
<td vAlign=top width=163>PRELUDIO</td>
<td vAlign=top width=295>wie ECO-RONDA, jedoch Hochglanz-Finish</td>
<td class=bild></td></div><a href="javascript:setcontent('32','front_content.php?action=10&idcat=33&idart=32&idartlang=32&type=CMS_HTML&typenr=1&lang=3&contenido=40fdda357e2f2b062d16623e068c8d30')">
<img src="http://localhost/contenido2/contenido/images/but_edithtml.gif" border="0"></a>
<a href="javascript:setcontent('32','0')"><img src="http://localhost/contenido2/contenido/images/but_speichern.gif" border="0"> </a></tr></table>
Ich schreibe das alles, weil ich vermute, daß darin die Ursache des anfangs beschriebenen Problems zu finden ist. Bisher hatte ich dieses Phänomen noch nicht. Nun baut aber mein gesamtes Layout auf DIVs auf und lediglich an einer Stelle ist die Produkttabelle als echter Datenkontainer enthalten. Der Vollständigkeit halber hier einmal das Gesamtlayout, aber ohne die Kopfdaten:
Code: Alles auswählen
<html><body>
<div id="mother">
<div id="title">
</div>
<div id="navcontainer">
<div id="nav">
CMS_CONTAINER[1]
</div>
<div id="navservice">
CMS_CONTAINER[2]
</div>
</div>
<!-- ende div navcontainer -->
<!-- marken-navigation mit dropdowns -->
<?php include("js/marken.inc.js"); ?>
<!-- anfang inhalte rechte seite -->
<div id="content">
<h1 class="header1">CMS_CONTAINER[3]</h1>
<div class="text">
<table class="daten" summary="Navigation zu Produkten des aktuellen Haendlers">
<tr>
<td class="katliste">
CMS_CONTAINER[4]
</td>
</tr>
<tr>
<td><h2 class="header2">CMS_CONTAINER[5]</h2></td>
</tr>
<tr>
<td>
<table class="produkttabelle" cellspacing="1" cellpadding="3" rules="all" frame="void" bordercolor="#804000"> CMS_CONTAINER[6]
</td></tr></table>
</td></tr></table></div>
</div>
<!-- ende inhalte rechte seite -->
</div>
</body>
</html>
Ein Bild gibt es auch noch:

Beachte im Bild: Die Tabelle wird UNTER dem umrandeten Feld des Moduls CMS_HTML dargestellt.
Viele Grüße,
Ayshe