Für jeden Textabschnitt lässt sich eine eigene CSS-Klasse definieren, die natürlich in CSS-File hinterlegt sein sollte. Bleibt das Eingabefeld leer, wird die Klasse Standard vergeben.
Der Vorteil ist hierbei natürlich: Es müssen weniger Layouts, Module und Templates erstellt werden um eine individuelle Seite darzustellen.
Version: 1.0
Contenido Version: 4.6.x
Erstellt am: 23.03.2007
Letzte Änderung: keine
Funktionen
* Auswahl der Anzahl von bis zu 10 Headline und Text Containern (HTML)
* Fehler bei falscher Eingabe der Anzhal
* Für jeden Abschnitt lässt sich eine eigene CSS Klasse definieren
* Ausgegeben werden nur ausgefüllte Headline und Text Container
Installation
* leicht
* XML File Importieren
* Template konfigurieren
* Loslegen...
Download
IT:TOOL
Input:
Code: Alles auswählen
$z = "CMS_VALUE[0]";
if ($z == NULL) {
$z = 0;
} elseif ($z > 10) {
$error = '<tr><td colspan="2" style="color:red;">'.mi18n("Bitte geben Sie eine Zahl <b>von 0 und 10</b> ein!").'</td></tr>';
$z = 0;
} else {
$z = "CMS_VALUE[0]";
$output = '';
}
?>
<table cellspacing="0" cellpadding="10" border="0">
<?php echo $error; ?>
<tr>
<td><?php echo mi18n("Anzahl Container (0 bis 10)"); ?></td>
<td><input style="width:30px;" type="text" name="<?php echo "CMS_VAR[0]"; ?>" value="<?php echo $z; ?>"> <input type="image" src="images/submit.gif"></td>
</tr>
<?php
if ($z != 0) {
echo '<tr>
<td>'.mi18n("Style:").'</td>
<td>';
$i = 0;
while ($z != $i) {
$i++;
$cms = $i+100;
echo 'Container: '.$i.' ';
echo '<input type="text" name="CMS_VAR['.$cms.']" value="';
echo $CMS_VALUE[$cms];
echo '"><br>';
}
echo '</tr>';
}
echo "</table>";
Code: Alles auswählen
<?php
$CMS_TYPE = array(
array("head" => "CMS_HTMLHEAD[1]","html" => "CMS_HTML[1]"),
array("head" => "CMS_HTMLHEAD[2]","html" => "CMS_HTML[2]"),
array("head" => "CMS_HTMLHEAD[3]","html" => "CMS_HTML[3]"),
array("head" => "CMS_HTMLHEAD[4]","html" => "CMS_HTML[4]"),
array("head" => "CMS_HTMLHEAD[5]","html" => "CMS_HTML[5]"),
array("head" => "CMS_HTMLHEAD[6]","html" => "CMS_HTML[6]"),
array("head" => "CMS_HTMLHEAD[7]","html" => "CMS_HTML[7]"),
array("head" => "CMS_HTMLHEAD[8]","html" => "CMS_HTML[8]"),
array("head" => "CMS_HTMLHEAD[9]","html" => "CMS_HTML[9]"),
array("head" => "CMS_HTMLHEAD[10]","html" => "CMS_HTML[10]")
);
$z = "CMS_VALUE[0]";
if ($z != "0") {
$i = 0;
while ($z != $i) {
$cms = $i+101;
if($CMS_VALUE[$cms] == "") {
$class = 'class="standard"';
} else {
$class = 'class="'.$CMS_VALUE[$cms].'"';
}
echo '<div '.$class.'><div class="intext">';
if ($CMS_TYPE[$i]["head"] != "") {
echo '<div class="headline">'.$CMS_TYPE[$i]["head"].'</div>';
}
if ($CMS_TYPE[$i]["html"] != "") {
echo '<div class="htmlcont">'.$CMS_TYPE[$i]["html"].'</div>';
}
echo '</div></div>';
$i++;
}
}
?>