ich bin gerade dabei etwas mit Contenido zu bauen und habe nun ein Modul geschrieben, welches eine dynamische Anzahl an Boxen erzeugt.
Wenn ich nun bei einem Artikel in die Konfiguration gehe, kann ich dort auswählen wie viel Boxen ich denn haben möchte - klappt soweit auch wird alles erzeugt.
Sobald ich allerdings die Variablen fülle und abspeichere sind diese Leer bzw nicht beschrieben.
Ich wäre euch für Hilfe sehr dankbar, ich beiß mir dadran noch die Zähne aus!
Hier der Code zum Modul Input - den Output habe ich noch nicht geschrieben, da die Variable ja eh nicht gespeichert wird...ich hoffe das hängt nicht zusammen
Code: Alles auswählen
?>
<table>
<tr>
<td>
Anzahl Blöcke:
</td>
<td>
<input type="text" name="CMS_VAR[99]" size="3" value="CMS_VALUE[99]">
</td>
</tr>
</table>';
<?php
$count = "CMS_VALUE[99]";
for($a = 0; $a < $count; $a++)
{
$headline=1+(3*$a);
$subheadline=2+(3*$a);
$text=3+(3*$a);
$b= $a+1;
echo '<table>
<tr>
<td colspan="2">
<strong>Textblock '.$b.'</strong>
</td>
</tr>
<tr>
<td>Headline:</td>
<td><input type="text" name="CMS_VAR['.$headline.']" size="20" value="CMS_VALUE['.$headline.']"></td>
</tr>
<tr>
<td>Subheadline:</td>
<td><input type="text" name="CMS_VAR['.$subheadline.']" size="20" value="CMS_VALUE['.$subheadline.']"></td>
</tr>
<tr>
<td align="top">Text:</td>
<td><textarea name="CMS_VAR['.$text.']" rows="10" cols="20">CMS_VALUE['.$text.']</textarea></td>
</tr>
</table>';
}
?>
<?php