<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://de.contaowiki.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
		<id>https://de.contaowiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JanoschSkuplik</id>
		<title>Contao Community Documentation - Benutzerbeiträge [de]</title>
		<link rel="self" type="application/atom+xml" href="https://de.contaowiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JanoschSkuplik"/>
		<link rel="alternate" type="text/html" href="https://de.contaowiki.org/Spezial:Beitr%C3%A4ge/JanoschSkuplik"/>
		<updated>2026-05-02T18:14:10Z</updated>
		<subtitle>Benutzerbeiträge</subtitle>
		<generator>MediaWiki 1.22.6</generator>

	<entry>
		<id>https://de.contaowiki.org/Dma_elementgenerator</id>
		<title>Dma elementgenerator</title>
		<link rel="alternate" type="text/html" href="https://de.contaowiki.org/Dma_elementgenerator"/>
				<updated>2012-07-03T14:09:04Z</updated>
		
		<summary type="html">&lt;p&gt;JanoschSkuplik: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Kategorie:Extensions]]&lt;br /&gt;
&lt;br /&gt;
{{ExtInfo&lt;br /&gt;
| Dev=DMA (Carsten Kollmeier, Janosch Skuplik)&lt;br /&gt;
| DevSite=http://www.dma.do/&lt;br /&gt;
| ExtVersion=0.0.3 alpha1&lt;br /&gt;
| Version=ab 2.9&lt;br /&gt;
| TLVersion=2.7.6 - 2.11.4&lt;br /&gt;
| ERLink=http://www.contao.org/erweiterungsliste/view/dma_elementgenerator.html&lt;br /&gt;
| Forum=http://www.contao-community.de/showthread.php?6119-dma_elementgenerator-Contentelemente-und-Frontendmodule-generieren&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Der Elementgenerator bietet eine Möglichkeit, Daten in einem vorgegebenem Layout auszugeben.&lt;br /&gt;
&lt;br /&gt;
= Beispiel / Tutorial =&lt;br /&gt;
== Element erstellen ==&lt;br /&gt;
Nach der erfolgreichen Installation wählt man zunächst den neuen Menüpunkt &amp;quot;Elementgenerator&amp;quot; unterhalb von Layout.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
An dieser Stelle lassen sich Elemente erstellen, die völlig unabhängig voneinander strukturierte Inhalte ausgeben. Man klickt also auf die Schaltfläche &amp;quot;Neues Element&amp;quot; und füllt die Maske wie folgt aus:&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Bezeichnung = Buch&amp;lt;br /&amp;gt;&lt;br /&gt;
Kategorie = Layouts&amp;lt;br /&amp;gt;&lt;br /&gt;
Template = dma_eg_default (temporär)&amp;lt;br /&amp;gt;&lt;br /&gt;
''Als Inhaltselement bereitstellen'' auswählen&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Die Bezeichnung dient nur der internen Verwaltung im Backend. Auch der Name der Kategorie ist frei wählbar und ordnet die Datensätze mit gleicher Bezeichnung innerhalb der Auswahl des Elementtyps im Bereich der Inhaltselemente. Das Template lässt man vorübergehend so, bis man später ein eigenes Template für den Datensatz erstellt.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Der Datensatz lässt sich selbstverständlich auch als Modul bereitstellen. Somit kann man diesen beispielsweise auch direkt im Seitenlayout verlinken.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Felder hinzufügen ==&lt;br /&gt;
Nun legt man die Felder an, die man ausgeben möchte. Die Auswahl ähnelt der von Formularen: Legende, Textfeld, Textarea, Auswahlliste, Checkboxen, Radiobuttons, Seitenauswahl, Dateiauswahl&amp;lt;br /&amp;gt;&lt;br /&gt;
Als nächstes legt man ein Textfeld an und füllt es folgendermaßen aus:&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Textfeld:&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschriftung = Titel&amp;lt;br /&amp;gt;&lt;br /&gt;
Feldname = titel&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschreibung = Bitte vergeben Sie für das Buch einen Titel&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Textfeld:&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschriftung = Autor&amp;lt;br /&amp;gt;&lt;br /&gt;
Feldname = autor&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschreibung = Bitte vergeben Sie für das Buch einen Autor&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Textfeld:&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschriftung = Verlag&amp;lt;br /&amp;gt;&lt;br /&gt;
Feldname = verlag&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschreibung = Bitte vergeben Sie für das Buch einen Verlag&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Textfeld:&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschriftung = Alter&amp;lt;br /&amp;gt;&lt;br /&gt;
Feldname = alter&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschreibung = Bitte nennen Sie, für welches Alter das Buch geeignet ist&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Textfeld:&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschriftung = Form&amp;lt;br /&amp;gt;&lt;br /&gt;
Feldname = form&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschreibung = Bitte nennen Sie, welche Form das Buch aufweist&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Textarea:&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschriftung = Beschreibung&amp;lt;br /&amp;gt;&lt;br /&gt;
Feldname = beschreibung&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschreibung = Bitte beschreiben Sie das Buch&amp;lt;br /&amp;gt;&lt;br /&gt;
Zeilen = 5&amp;lt;br /&amp;gt;&lt;br /&gt;
Spalten = 100&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dateiauswahl:&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschriftung = Bild&amp;lt;br /&amp;gt;&lt;br /&gt;
Feldname = bild&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschreibung = Wählen Sie ein Bild aus&amp;lt;br /&amp;gt;&lt;br /&gt;
Vorgabe = (hier könnte man ein Default-Bild angeben)&amp;lt;br /&amp;gt;&lt;br /&gt;
Art der Auswahl = ft_radio&amp;lt;br /&amp;gt;&lt;br /&gt;
Pfad = Pfad/zum/Bild.jpg&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Template anlegen ==&lt;br /&gt;
Nun liegt ein Datensatz vor mit drei Feldern, die man in einem Template abfragen möchte. Unter Layout/Templates leget man ein neues Template auf Basis des Originaltemplates &amp;quot;dma_eg_default.tpl&amp;quot; und weist diesem das jeweilige Zielverzeichnis zu. Nach dem Speichern kann über &amp;quot;bearbeiten&amp;quot; der Name geändert werden (z.B. in dma_eg_buchvorstellung.tpl) und natürlich muss man dieses neue Template unter &amp;quot;Elementgenerator/Buch&amp;quot; gegen das Standardtemplate ersetzen.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;&amp;lt;?php echo $this-&amp;gt;class; ?&amp;gt; block&amp;quot;&amp;lt;?php echo $this-&amp;gt;cssID; ?&amp;gt;&lt;br /&gt;
&amp;lt;?php if ($this-&amp;gt;style): ?&amp;gt; style=&amp;quot;&amp;lt;?php echo $this-&amp;gt;style; ?&amp;gt;&amp;quot;&amp;lt;?php endif; ?&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;elements['titel']; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;div class=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;table&amp;gt;&lt;br /&gt;
				&amp;lt;tbody&amp;gt;&lt;br /&gt;
					&amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;first&amp;quot;&amp;gt;&amp;lt;?php if ($this-&amp;gt;elements['titel']): ?&amp;gt;&amp;lt;?php echo $this-&amp;gt;labels['titel']; ?&amp;gt;:&amp;lt;/td&amp;gt;&amp;lt;td class=&amp;quot;last&amp;quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;elements['titel']; ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
					&amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;first&amp;quot;&amp;gt;&amp;lt;?php if ($this-&amp;gt;elements['autor']): ?&amp;gt;&amp;lt;?php echo $this-&amp;gt;labels['autor']; ?&amp;gt;:&amp;lt;/td&amp;gt;&amp;lt;td class=&amp;quot;last&amp;quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;elements['autor']; ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
					&amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;first&amp;quot;&amp;gt;&amp;lt;?php if ($this-&amp;gt;elements['verlag']): ?&amp;gt;&amp;lt;?php echo $this-&amp;gt;labels['verlag']; ?&amp;gt;:&amp;lt;/td&amp;gt;&amp;lt;td class=&amp;quot;last&amp;quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;elements['verlag']; ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
					&amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;first&amp;quot;&amp;gt;&amp;lt;?php if ($this-&amp;gt;elements['alter']): ?&amp;gt;&amp;lt;?php echo $this-&amp;gt;labels['alter']; ?&amp;gt;:&amp;lt;/td&amp;gt;&amp;lt;td class=&amp;quot;last&amp;quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;elements['alter']; ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
					&amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;first&amp;quot;&amp;gt;&amp;lt;?php if ($this-&amp;gt;elements['form']): ?&amp;gt;&amp;lt;?php echo $this-&amp;gt;labels['form']; ?&amp;gt;:&amp;lt;/td&amp;gt;&amp;lt;td class=&amp;quot;last&amp;quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;elements['form']; ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
				&amp;lt;/tbody&amp;gt;&lt;br /&gt;
			&amp;lt;/table&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;?php if ($this-&amp;gt;elements['bild']): ?&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;right&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- teaserstart --&amp;gt;&amp;lt;div class=&amp;quot;image_container&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;img src=&amp;quot;&amp;lt;?php echo $this-&amp;gt;elements['bild']; ?&amp;gt;&amp;quot; alt=&amp;quot;&amp;lt;?php echo $this-&amp;gt;elements['name']; ?&amp;gt;&amp;quot; width=&amp;quot;150&amp;quot; /&amp;gt;&lt;br /&gt;
			&lt;br /&gt;
&amp;lt;div class=&amp;quot;caption&amp;quot;&amp;gt;&amp;lt;?php if ($this-&amp;gt;elements['titel']): ?&amp;gt;&amp;lt;?php echo $this-&amp;gt;elements['titel']; ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&amp;lt;!-- teaserend --&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;div class=&amp;quot;twocol&amp;quot;&amp;gt;&amp;lt;!-- teaserstart --&amp;gt; &amp;lt;?php if ($this-&amp;gt;elements['beschreibung']): ?&amp;gt;&amp;lt;?php echo nl2br($this-&amp;gt;elements['beschreibung']); ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;!-- teaserend --&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
In dem Template wird das Bild in einer Breite von 150 Pixel ausgegeben, die Bildunterschrift gibt den Titel wieder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Buch als Inhaltselement integrieren ==&lt;br /&gt;
&lt;br /&gt;
In der Artikelstruktur lässt sich nun dieses Inhaltelement &amp;quot;Buch&amp;quot; wie jeder andere Elementtyp dem Artikel hinzufügen. Wählt man diese nun aus, findet man die drei Felder vor, die nun auszufüllen sind und kann den Datensatz nun Speichern und betrachten. &lt;br /&gt;
&lt;br /&gt;
== Bildergalerie darstellen ==&lt;br /&gt;
&lt;br /&gt;
Hier ein Codeschnipsel, wie man im Template auf die Bilddaten im Falle einer Galerie zugreift:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php foreach(deserialize($this-&amp;gt;elements['gallery'], true) as $bild): ?&amp;gt;&lt;br /&gt;
&amp;lt;img src=&amp;quot;&amp;lt;?php echo $bild; ?&amp;gt;&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;?php endforeach; ?&amp;gt;  &lt;br /&gt;
&amp;lt;/source&amp;gt;			&lt;br /&gt;
&lt;br /&gt;
Hierzu muss das serialisierte Array zunächst deserialisiert werden und kann dann über eine foreach Schleife schließlich ausgegeben werden. Das Beispiel ist absichtlich sehr einfach gehalten.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[Benutzer:Carino|Carino]] 21:00, 07. Sept. 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>JanoschSkuplik</name></author>	</entry>

	<entry>
		<id>https://de.contaowiki.org/Dma_elementgenerator</id>
		<title>Dma elementgenerator</title>
		<link rel="alternate" type="text/html" href="https://de.contaowiki.org/Dma_elementgenerator"/>
				<updated>2012-07-03T14:08:32Z</updated>
		
		<summary type="html">&lt;p&gt;JanoschSkuplik: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Kategorie:Extensions]]&lt;br /&gt;
&lt;br /&gt;
{{ExtInfo&lt;br /&gt;
| Dev=DMA (Carsten Kollmeier, Janosch Skuplik)&lt;br /&gt;
| DevSite=http://www.ckollmeier.de/&lt;br /&gt;
| ExtVersion=0.0.1 beta2&lt;br /&gt;
| Version=ab 2.9&lt;br /&gt;
| TLVersion=2.7.6 - 2.8.3&lt;br /&gt;
| ERLink=http://www.contao.org/erweiterungsliste/view/dma_elementgenerator.html&lt;br /&gt;
| Forum=http://www.contao-community.de/showthread.php?6119-dma_elementgenerator-Contentelemente-und-Frontendmodule-generieren&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Der Elementgenerator bietet eine Möglichkeit, Daten in einem vorgegebenem Layout auszugeben.&lt;br /&gt;
&lt;br /&gt;
= Beispiel / Tutorial =&lt;br /&gt;
== Element erstellen ==&lt;br /&gt;
Nach der erfolgreichen Installation wählt man zunächst den neuen Menüpunkt &amp;quot;Elementgenerator&amp;quot; unterhalb von Layout.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
An dieser Stelle lassen sich Elemente erstellen, die völlig unabhängig voneinander strukturierte Inhalte ausgeben. Man klickt also auf die Schaltfläche &amp;quot;Neues Element&amp;quot; und füllt die Maske wie folgt aus:&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Bezeichnung = Buch&amp;lt;br /&amp;gt;&lt;br /&gt;
Kategorie = Layouts&amp;lt;br /&amp;gt;&lt;br /&gt;
Template = dma_eg_default (temporär)&amp;lt;br /&amp;gt;&lt;br /&gt;
''Als Inhaltselement bereitstellen'' auswählen&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Die Bezeichnung dient nur der internen Verwaltung im Backend. Auch der Name der Kategorie ist frei wählbar und ordnet die Datensätze mit gleicher Bezeichnung innerhalb der Auswahl des Elementtyps im Bereich der Inhaltselemente. Das Template lässt man vorübergehend so, bis man später ein eigenes Template für den Datensatz erstellt.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Der Datensatz lässt sich selbstverständlich auch als Modul bereitstellen. Somit kann man diesen beispielsweise auch direkt im Seitenlayout verlinken.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Felder hinzufügen ==&lt;br /&gt;
Nun legt man die Felder an, die man ausgeben möchte. Die Auswahl ähnelt der von Formularen: Legende, Textfeld, Textarea, Auswahlliste, Checkboxen, Radiobuttons, Seitenauswahl, Dateiauswahl&amp;lt;br /&amp;gt;&lt;br /&gt;
Als nächstes legt man ein Textfeld an und füllt es folgendermaßen aus:&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Textfeld:&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschriftung = Titel&amp;lt;br /&amp;gt;&lt;br /&gt;
Feldname = titel&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschreibung = Bitte vergeben Sie für das Buch einen Titel&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Textfeld:&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschriftung = Autor&amp;lt;br /&amp;gt;&lt;br /&gt;
Feldname = autor&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschreibung = Bitte vergeben Sie für das Buch einen Autor&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Textfeld:&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschriftung = Verlag&amp;lt;br /&amp;gt;&lt;br /&gt;
Feldname = verlag&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschreibung = Bitte vergeben Sie für das Buch einen Verlag&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Textfeld:&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschriftung = Alter&amp;lt;br /&amp;gt;&lt;br /&gt;
Feldname = alter&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschreibung = Bitte nennen Sie, für welches Alter das Buch geeignet ist&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Textfeld:&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschriftung = Form&amp;lt;br /&amp;gt;&lt;br /&gt;
Feldname = form&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschreibung = Bitte nennen Sie, welche Form das Buch aufweist&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Textarea:&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschriftung = Beschreibung&amp;lt;br /&amp;gt;&lt;br /&gt;
Feldname = beschreibung&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschreibung = Bitte beschreiben Sie das Buch&amp;lt;br /&amp;gt;&lt;br /&gt;
Zeilen = 5&amp;lt;br /&amp;gt;&lt;br /&gt;
Spalten = 100&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dateiauswahl:&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschriftung = Bild&amp;lt;br /&amp;gt;&lt;br /&gt;
Feldname = bild&amp;lt;br /&amp;gt;&lt;br /&gt;
Beschreibung = Wählen Sie ein Bild aus&amp;lt;br /&amp;gt;&lt;br /&gt;
Vorgabe = (hier könnte man ein Default-Bild angeben)&amp;lt;br /&amp;gt;&lt;br /&gt;
Art der Auswahl = ft_radio&amp;lt;br /&amp;gt;&lt;br /&gt;
Pfad = Pfad/zum/Bild.jpg&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Template anlegen ==&lt;br /&gt;
Nun liegt ein Datensatz vor mit drei Feldern, die man in einem Template abfragen möchte. Unter Layout/Templates leget man ein neues Template auf Basis des Originaltemplates &amp;quot;dma_eg_default.tpl&amp;quot; und weist diesem das jeweilige Zielverzeichnis zu. Nach dem Speichern kann über &amp;quot;bearbeiten&amp;quot; der Name geändert werden (z.B. in dma_eg_buchvorstellung.tpl) und natürlich muss man dieses neue Template unter &amp;quot;Elementgenerator/Buch&amp;quot; gegen das Standardtemplate ersetzen.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;&amp;lt;?php echo $this-&amp;gt;class; ?&amp;gt; block&amp;quot;&amp;lt;?php echo $this-&amp;gt;cssID; ?&amp;gt;&lt;br /&gt;
&amp;lt;?php if ($this-&amp;gt;style): ?&amp;gt; style=&amp;quot;&amp;lt;?php echo $this-&amp;gt;style; ?&amp;gt;&amp;quot;&amp;lt;?php endif; ?&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;elements['titel']; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;div class=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;table&amp;gt;&lt;br /&gt;
				&amp;lt;tbody&amp;gt;&lt;br /&gt;
					&amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;first&amp;quot;&amp;gt;&amp;lt;?php if ($this-&amp;gt;elements['titel']): ?&amp;gt;&amp;lt;?php echo $this-&amp;gt;labels['titel']; ?&amp;gt;:&amp;lt;/td&amp;gt;&amp;lt;td class=&amp;quot;last&amp;quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;elements['titel']; ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
					&amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;first&amp;quot;&amp;gt;&amp;lt;?php if ($this-&amp;gt;elements['autor']): ?&amp;gt;&amp;lt;?php echo $this-&amp;gt;labels['autor']; ?&amp;gt;:&amp;lt;/td&amp;gt;&amp;lt;td class=&amp;quot;last&amp;quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;elements['autor']; ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
					&amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;first&amp;quot;&amp;gt;&amp;lt;?php if ($this-&amp;gt;elements['verlag']): ?&amp;gt;&amp;lt;?php echo $this-&amp;gt;labels['verlag']; ?&amp;gt;:&amp;lt;/td&amp;gt;&amp;lt;td class=&amp;quot;last&amp;quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;elements['verlag']; ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
					&amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;first&amp;quot;&amp;gt;&amp;lt;?php if ($this-&amp;gt;elements['alter']): ?&amp;gt;&amp;lt;?php echo $this-&amp;gt;labels['alter']; ?&amp;gt;:&amp;lt;/td&amp;gt;&amp;lt;td class=&amp;quot;last&amp;quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;elements['alter']; ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
					&amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;first&amp;quot;&amp;gt;&amp;lt;?php if ($this-&amp;gt;elements['form']): ?&amp;gt;&amp;lt;?php echo $this-&amp;gt;labels['form']; ?&amp;gt;:&amp;lt;/td&amp;gt;&amp;lt;td class=&amp;quot;last&amp;quot;&amp;gt;&amp;lt;?php echo $this-&amp;gt;elements['form']; ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
				&amp;lt;/tbody&amp;gt;&lt;br /&gt;
			&amp;lt;/table&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;?php if ($this-&amp;gt;elements['bild']): ?&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;right&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- teaserstart --&amp;gt;&amp;lt;div class=&amp;quot;image_container&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;img src=&amp;quot;&amp;lt;?php echo $this-&amp;gt;elements['bild']; ?&amp;gt;&amp;quot; alt=&amp;quot;&amp;lt;?php echo $this-&amp;gt;elements['name']; ?&amp;gt;&amp;quot; width=&amp;quot;150&amp;quot; /&amp;gt;&lt;br /&gt;
			&lt;br /&gt;
&amp;lt;div class=&amp;quot;caption&amp;quot;&amp;gt;&amp;lt;?php if ($this-&amp;gt;elements['titel']): ?&amp;gt;&amp;lt;?php echo $this-&amp;gt;elements['titel']; ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&amp;lt;!-- teaserend --&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;div class=&amp;quot;twocol&amp;quot;&amp;gt;&amp;lt;!-- teaserstart --&amp;gt; &amp;lt;?php if ($this-&amp;gt;elements['beschreibung']): ?&amp;gt;&amp;lt;?php echo nl2br($this-&amp;gt;elements['beschreibung']); ?&amp;gt;&amp;lt;?php endif; ?&amp;gt;&amp;lt;!-- teaserend --&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
In dem Template wird das Bild in einer Breite von 150 Pixel ausgegeben, die Bildunterschrift gibt den Titel wieder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Buch als Inhaltselement integrieren ==&lt;br /&gt;
&lt;br /&gt;
In der Artikelstruktur lässt sich nun dieses Inhaltelement &amp;quot;Buch&amp;quot; wie jeder andere Elementtyp dem Artikel hinzufügen. Wählt man diese nun aus, findet man die drei Felder vor, die nun auszufüllen sind und kann den Datensatz nun Speichern und betrachten. &lt;br /&gt;
&lt;br /&gt;
== Bildergalerie darstellen ==&lt;br /&gt;
&lt;br /&gt;
Hier ein Codeschnipsel, wie man im Template auf die Bilddaten im Falle einer Galerie zugreift:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php foreach(deserialize($this-&amp;gt;elements['gallery'], true) as $bild): ?&amp;gt;&lt;br /&gt;
&amp;lt;img src=&amp;quot;&amp;lt;?php echo $bild; ?&amp;gt;&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;?php endforeach; ?&amp;gt;  &lt;br /&gt;
&amp;lt;/source&amp;gt;			&lt;br /&gt;
&lt;br /&gt;
Hierzu muss das serialisierte Array zunächst deserialisiert werden und kann dann über eine foreach Schleife schließlich ausgegeben werden. Das Beispiel ist absichtlich sehr einfach gehalten.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[Benutzer:Carino|Carino]] 21:00, 07. Sept. 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>JanoschSkuplik</name></author>	</entry>

	</feed>