<?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/index.php?action=history&amp;feed=atom&amp;title=Callback-Funktion_bei_Erstellung_einer_neuen_Seite</id>
		<title>Callback-Funktion bei Erstellung einer neuen Seite - Versionsgeschichte</title>
		<link rel="self" type="application/atom+xml" href="https://de.contaowiki.org/index.php?action=history&amp;feed=atom&amp;title=Callback-Funktion_bei_Erstellung_einer_neuen_Seite"/>
		<link rel="alternate" type="text/html" href="https://de.contaowiki.org/index.php?title=Callback-Funktion_bei_Erstellung_einer_neuen_Seite&amp;action=history"/>
		<updated>2026-05-02T16:05:50Z</updated>
		<subtitle>Versionsgeschichte dieser Seite in Contao Community Documentation</subtitle>
		<generator>MediaWiki 1.22.6</generator>

	<entry>
		<id>https://de.contaowiki.org/index.php?title=Callback-Funktion_bei_Erstellung_einer_neuen_Seite&amp;diff=5229&amp;oldid=prev</id>
		<title>Lucina am 5. Mai 2012 um 06:53 Uhr</title>
		<link rel="alternate" type="text/html" href="https://de.contaowiki.org/index.php?title=Callback-Funktion_bei_Erstellung_einer_neuen_Seite&amp;diff=5229&amp;oldid=prev"/>
				<updated>2012-05-05T06:53:26Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Version vom 5. Mai 2012, 06:53 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Version=all versions&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Version=all versions&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Core&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Admin HOWTOS&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Dev HOWTOS]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Dev HOWTOS]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key kunde29sql1:diff:version:1.11a:oldid:5228:newid:5229 --&gt;
&lt;/table&gt;</summary>
		<author><name>Lucina</name></author>	</entry>

	<entry>
		<id>https://de.contaowiki.org/index.php?title=Callback-Funktion_bei_Erstellung_einer_neuen_Seite&amp;diff=5228&amp;oldid=prev</id>
		<title>Lucina am 5. Mai 2012 um 06:52 Uhr</title>
		<link rel="alternate" type="text/html" href="https://de.contaowiki.org/index.php?title=Callback-Funktion_bei_Erstellung_einer_neuen_Seite&amp;diff=5228&amp;oldid=prev"/>
				<updated>2012-05-05T06:52:18Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Version vom 5. Mai 2012, 06:52 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{AppliesTo&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| Version=all versions&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category: Core]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Dev HOWTOS]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Beim Erstellen einer neuen Seite im Backend soll automatisch eine Mail verschickt werden. Dafür werden die Callbacks oncreate_callback und onsubmit_callback verwendet.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Beim Erstellen einer neuen Seite im Backend soll automatisch eine Mail verschickt werden. Dafür werden die Callbacks oncreate_callback und onsubmit_callback verwendet.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key kunde29sql1:diff:version:1.11a:oldid:5227:newid:5228 --&gt;
&lt;/table&gt;</summary>
		<author><name>Lucina</name></author>	</entry>

	<entry>
		<id>https://de.contaowiki.org/index.php?title=Callback-Funktion_bei_Erstellung_einer_neuen_Seite&amp;diff=5227&amp;oldid=prev</id>
		<title>Tina: Die Seite wurde neu angelegt: „Beim Erstellen einer neuen Seite im Backend soll automatisch eine Mail verschickt werden. Dafür werden die Callbacks oncreate_callback und onsubmit_callback verw…“</title>
		<link rel="alternate" type="text/html" href="https://de.contaowiki.org/index.php?title=Callback-Funktion_bei_Erstellung_einer_neuen_Seite&amp;diff=5227&amp;oldid=prev"/>
				<updated>2012-05-04T15:22:21Z</updated>
		
		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „Beim Erstellen einer neuen Seite im Backend soll automatisch eine Mail verschickt werden. Dafür werden die Callbacks oncreate_callback und onsubmit_callback verw…“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Beim Erstellen einer neuen Seite im Backend soll automatisch eine Mail verschickt werden. Dafür werden die Callbacks oncreate_callback und onsubmit_callback verwendet.&lt;br /&gt;
&lt;br /&gt;
oncreate_callback wird getriggert, sobald der Benutzer eine neue Seite anlegt. Die ID der Seite wird in der Session gespeichert.&lt;br /&gt;
Beim Speichern wird onsubmit_callback getriggert. Die in der Session gespeicherte ID wird mit der ID des Datensatzes verglichen, um sicherzugehen, dass nicht lediglich eine bereits existierende Seite bearbeitet wird.&lt;br /&gt;
&lt;br /&gt;
Hier ein Beispiel:&lt;br /&gt;
&lt;br /&gt;
dcaconfig.php:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$GLOBALS['TL_DCA']['tl_page']['config']['oncreate_callback'][] = array('backendExtended','createPage');&lt;br /&gt;
$GLOBALS['TL_DCA']['tl_page']['config']['onsubmit_callback'][] = array('backendExtended','sendMail');&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Neu angelegte backendExtended.php unter system/modules/backendExtended:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
if (!defined('TL_ROOT')) die('You can not access this file directly!');&lt;br /&gt;
&lt;br /&gt;
class backendExtended extends Backend {&lt;br /&gt;
&lt;br /&gt;
    public function createPage($table,$id) {&lt;br /&gt;
        $this-&amp;gt;Session-&amp;gt;set('newPageId',$id);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public function sendMail($dc) {&lt;br /&gt;
        if ($this-&amp;gt;Session-&amp;gt;get('newPageId') == $dc-&amp;gt;activeRecord-&amp;gt;id) {&lt;br /&gt;
            $objEmail = new Email();&lt;br /&gt;
            $objEmail-&amp;gt;subject = 'neue Seite';&lt;br /&gt;
            $objEmail-&amp;gt;from = $GLOBALS[TL_CONFIG][adminEmail];&lt;br /&gt;
            $objEmail-&amp;gt;fromName = 'Admin';&lt;br /&gt;
            $objEmail-&amp;gt;text = 'Auf der Website wurde eine neue Seite erstellt:'.&amp;quot;\n&amp;quot;;&lt;br /&gt;
            $objEmail-&amp;gt;text .= $dc-&amp;gt;activeRecord-&amp;gt;title;&lt;br /&gt;
            $objEmail-&amp;gt;sendTo($GLOBALS[TL_CONFIG][adminEmail]);&lt;br /&gt;
            $this-&amp;gt;Session-&amp;gt;set('newPageId',NULL);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tina</name></author>	</entry>

	</feed>