<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://fbb.just4test.de/extern.php?action=feed&amp;tid=3510&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Informationen für CMS/made simple / Problem mit Variablen im Modulaufruf]]></title>
		<link>http://www.cmsmadesimple.de/forum/viewtopic.php?id=3510</link>
		<description><![CDATA[Die aktuellsten Beiträge in Problem mit Variablen im Modulaufruf.]]></description>
		<lastBuildDate>Sat, 12 Oct 2013 13:14:56 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Problem mit Variablen im Modulaufruf]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28143#p28143</link>
			<description><![CDATA[<div class="quotebox"><cite>NaN schrieb:</cite><blockquote><div><div class="quotebox"><blockquote><div><div class="codebox"><pre><code>{assign var=rdelim value=&quot;}&quot;} 
{assign var=ldelim value=&quot;{&quot;} 
{eval var=$ldelim|cat:&quot;ListIt2 `$smarty.get.searchfield`=&#039;1&#039;$rdelim&quot;}</code></pre></div><p>führt zu Unexpected &quot;}&quot;</p></div></blockquote></div><p>Nur noch kurz zur Ergänzung: Das Assign ist da fehl am Platz. Die beiden Variablen $ldelim und $rdelim sind reservierte Smarty-Variablen. Die brauchst Du nicht zu erstellen.</p></div></blockquote></div><p>Da wird aber nix angezeigt ... der Modulaufruf wird korrekt zusammengesetzt, aber halt ohne die geschweiften Klammern. Deshalb habe ich das mit dem assign probiert ...</p><br /><div class="quotebox"><blockquote><div><p>Ist das Problem denn damit jetzt gelöst?</p></div></blockquote></div><p>Ich bau mir am Montag mal ein Plugin.</p><p>Nochmals vielen Dank!<br />Alex</p>]]></description>
			<author><![CDATA[dummy@example.com (faglork)]]></author>
			<pubDate>Sat, 12 Oct 2013 13:14:56 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28143#p28143</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem mit Variablen im Modulaufruf]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28142#p28142</link>
			<description><![CDATA[<div class="quotebox"><blockquote><div><div class="codebox"><pre><code>{assign var=rdelim value=&quot;}&quot;} 
{assign var=ldelim value=&quot;{&quot;} 
{eval var=$ldelim|cat:&quot;ListIt2 `$smarty.get.searchfield`=&#039;1&#039;$rdelim&quot;}</code></pre></div><p>führt zu Unexpected &quot;}&quot;</p></div></blockquote></div><p>Nur noch kurz zur Ergänzung: Das Assign ist da fehl am Platz. Die beiden Variablen $ldelim und $rdelim sind reservierte Smarty-Variablen. Die brauchst Du nicht zu erstellen. Wenn es dann immer noch nicht geht, dann ginge evtl. noch das hier:</p><div class="codebox"><pre><code>{eval var=$ldelim|cat:&quot;ListIt2 `$smarty.get.searchfield`=&#039;1&#039;&quot;|cat:$rdelim}</code></pre></div><div class="quotebox"><blockquote><div><p>Ein herzliches Dankeschön für die Erläuterungen!</p></div></blockquote></div><p>Immer wieder gerne.<br />Ist das Problem denn damit jetzt gelöst?</p>]]></description>
			<author><![CDATA[dummy@example.com (NaN)]]></author>
			<pubDate>Fri, 11 Oct 2013 20:21:16 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28142#p28142</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem mit Variablen im Modulaufruf]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28139#p28139</link>
			<description><![CDATA[<p>Moin!</p><p>Ich möchte Dir hiermit mal ein dickes Lob aussprechen!</p><p>Wenn alle Leute (speziell in der englischen community ...) in der Lage wären, so präzise zu antworten wie Du, dann hätten wir viele Probleme nicht.</p><p>Ein herzliches Dankeschön für die Erläuterungen! </p><p>Servus,<br />Alex</p>]]></description>
			<author><![CDATA[dummy@example.com (faglork)]]></author>
			<pubDate>Fri, 11 Oct 2013 15:34:51 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28139#p28139</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem mit Variablen im Modulaufruf]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28138#p28138</link>
			<description><![CDATA[<div class="quotebox"><blockquote><div><p>Wo finde ich denn Infos zu DoActionBase?</p></div></blockquote></div><p>Garnicht. Weil mein Fehler. DoActionBase() ist nicht dokumentiert, weil interne Core-Funktion.<br />Also nimm lieber DoAction().<br /><a href="http://forum.cmsmadesimple.de/viewtopic.php?pid=27657#p27657" rel="nofollow">http://forum.cmsmadesimple.de/viewtopic … 657#p27657</a><br /><a href="http://apidoc.cmsmadesimple.org" rel="nofollow">http://apidoc.cmsmadesimple.org</a>/<br />Links unter <a href="http://apidoc.cmsmadesimple.org/CMS/CMSModule.html" rel="nofollow">CMSModule</a> -&gt; <a href="http://apidoc.cmsmadesimple.org/CMS/CMSModule.html#DoAction" rel="nofollow">DoAction()</a>.</p><div class="quotebox"><blockquote><div><p>Ich versuch mal zu übersetzen:<br />- Listit2 Modul instanziieren</p></div></blockquote></div><p>Richtig.</p><div class="quotebox"><blockquote><div><p>- Dem Modul sagen was es machen soll.</p></div></blockquote></div><p>Richtig.</p><div class="quotebox"><blockquote><div><p>Gibts da noch was anderes ausser DoActionBase? Wo finde ich die Infos darüber?</p></div></blockquote></div><p>Da gibt&#039;s ein Haufen Funktionen. Stehen alle in der API Doc. Aber DoAction() ist diejenige welche, die eine Modul-Aktion ausführt. Eine andere wirst Du selten brauchen.<br />Welche Aktion mit DoAction() ausgeführt wird , steht im ersten Parameter:</p><div class="quotebox"><blockquote><div><p>- Aktion festlegen &#039;default&#039;, also Ausgabe (vermute ich mal)</p></div></blockquote></div><p>Richtig. Die Standard Frontend-Aktion des Listit Moduls, die ausgeführt wird, wenn das Modul im Template oder via URL aufgerufen wird. Was es da noch alles für Aktionen gibt, hängt vom Modul ab.</p><div class="quotebox"><blockquote><div><p>- cntnt01 = ???</p></div></blockquote></div><p>Stichwort <a href="http://forum.cmsmadesimple.de/viewtopic.php?pid=8212#p8212" rel="nofollow">Modul-ID</a>.</p><div class="quotebox"><blockquote><div><p>- ein Array erzeugen mit 1 key/wert Paar welches wohl von dem Modul verarbeitet wird. Da könnte man auch mehrere Paare übergeben?</p></div></blockquote></div><p>Du übergibst der Funtion DoAction() ein Array. Das sind die Modul-Parameter. Genau wie im Template: parameter_name=&gt;&quot;parameter_wert&quot; <br />Du kannst da alle Parameter übergeben, die das Modul kennt.</p><div class="quotebox"><blockquote><div><p>Andererseits: Mit nem Plugin könnte man sich den Modulaufruf ja bequemst in PHP zurechtpfriemeln. Ist ein Plugin nicht sogar performanter?</p></div></blockquote></div><p>Ja² <img src="http://www.cmsmadesimple.de/forum/plugins/ezbbc/style/smilies/wink.png" alt="wink" /></p>]]></description>
			<author><![CDATA[dummy@example.com (NaN)]]></author>
			<pubDate>Fri, 11 Oct 2013 13:40:01 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28138#p28138</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem mit Variablen im Modulaufruf]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28136#p28136</link>
			<description><![CDATA[<div class="quotebox"><cite>NaN schrieb:</cite><blockquote><div><p>Was ist damit:</p><div class="codebox"><pre><code>{ListIt2 `$smarty.get.searchfield`=&quot;1&quot;}</code></pre></div></div></blockquote></div><p>Nope ...</p><br /><div class="quotebox"><cite>NaN schrieb:</cite><blockquote><div><p>Ich bin mir aber nicht sicher, ob man bei Smarty Variablen als Parameter-Namen verwenden kann.<br />Wenn nicht, dann musst Du Dir den Aufruf als Text zusammenbasteln und mit {eval} ausführen.<br />Bsp:</p><div class="codebox"><pre><code>{eval var=$ldelim|cat:&quot;ListIt2 `$smarty.get.searchfield`=&#039;1&#039;$rdelim&quot;}</code></pre></div></div></blockquote></div><div class="codebox"><pre><code>{assign var=rdelim value=&quot;}&quot;} 
{assign var=ldelim value=&quot;{&quot;} 
{eval var=$ldelim|cat:&quot;ListIt2 `$smarty.get.searchfield`=&#039;1&#039;$rdelim&quot;}</code></pre></div><p>führt zu Unexpected &quot;}&quot;</p><div class="quotebox"><cite>NaN schrieb:</cite><blockquote><div><p>Oder schreib Dir lieber gleich ein Plugin/UDT.<br />Dann musst Du im Template nur prüfen, ob {$smarty.get.searchfield} vorhanden ist.<br />Wenn ja, dann Dein UDT ausführen (der dann ListIt ausführt):</p><div class="codebox"><pre><code>{if isset($smarty.get.searchfield)}
    {deinUDT}
{/if}</code></pre></div><p>Als UDT wäre das eine einzige Zeile:</p><div class="codebox"><pre><code>cms_utils::get_module(&#039;ListIt2&#039;)-&gt;DoActionBase(&#039;default&#039;, &#039;cntnt01&#039;, array($_GET[&#039;searchfield&#039;] =&gt; 1));</code></pre></div></div></blockquote></div><p>Wo finde ich denn Infos zu DoActionBase?</p><br /><p>Ich versuch mal zu übersetzen:<br />- Listit2 Modul instanziieren<br />- Dem Modul sagen was es machen soll. Gibts da noch was anderes ausser DoActionBase? Wo finde ich die Infos darüber?<br />- Aktion festlegen &#039;default&#039;, also Ausgabe (vermute ich mal)<br />- cntnt01 = ???<br />- ein Array erzeugen mit 1 key/wert Paar welches wohl von dem Modul verarbeitet wird. Da könnte man auch mehrere Paare übergeben?</p><br /><p>Andererseits: Mit nem Plugin könnte man sich den Modulaufruf ja bequemst in PHP zurechtpfriemeln. Ist ein Plugin nicht sogar performanter?</p><p>Dank dir für deine Hilfe!<br />Alex</p>]]></description>
			<author><![CDATA[dummy@example.com (faglork)]]></author>
			<pubDate>Fri, 11 Oct 2013 12:47:26 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28136#p28136</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem mit Variablen im Modulaufruf]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28133#p28133</link>
			<description><![CDATA[<p>Was ist damit:</p><div class="codebox"><pre><code>{ListIt2 `$smarty.get.searchfield`=&quot;1&quot;}</code></pre></div><p>Ich bin mir aber nicht sicher, ob man bei Smarty Variablen als Parameter-Namen verwenden kann.<br />Wenn nicht, dann musst Du Dir den Aufruf als Text zusammenbasteln und mit {eval} ausführen.<br />Bsp:</p><div class="codebox"><pre><code>{eval var=$ldelim|cat:&quot;ListIt2 `$smarty.get.searchfield`=&#039;1&#039;$rdelim&quot;}</code></pre></div><p>Oder schreib Dir lieber gleich ein Plugin/UDT.<br />Dann musst Du im Template nur prüfen, ob {$smarty.get.searchfield} vorhanden ist.<br />Wenn ja, dann Dein UDT ausführen (der dann ListIt ausführt):</p><div class="codebox"><pre><code>{if isset($smarty.get.searchfield)}
    {deinUDT}
{/if}</code></pre></div><p>Als UDT wäre das eine einzige Zeile:</p><div class="codebox"><pre><code>cms_utils::get_module(&#039;ListIt2&#039;)-&gt;DoActionBase(&#039;default&#039;, &#039;cntnt01&#039;, array($_GET[&#039;searchfield&#039;] =&gt; 1));</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (NaN)]]></author>
			<pubDate>Fri, 11 Oct 2013 07:31:29 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28133#p28133</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem mit Variablen im Modulaufruf]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28124#p28124</link>
			<description><![CDATA[<div class="quotebox"><cite>cyberman schrieb:</cite><blockquote><div><p>Und dies funzt auch nich?</p><div class="codebox"><pre><code>{ListIt2 {$smarty.get.searchfield}=&quot;1&quot;}</code></pre></div></div></blockquote></div><br /><p>Unexpected &quot;{&quot;, expected one of: &quot;}</p><p>Servus,<br />Alex</p>]]></description>
			<author><![CDATA[dummy@example.com (faglork)]]></author>
			<pubDate>Thu, 10 Oct 2013 14:43:00 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28124#p28124</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem mit Variablen im Modulaufruf]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28121#p28121</link>
			<description><![CDATA[<p>Und dies funzt auch nich?</p><div class="codebox"><pre><code>{ListIt2 {$smarty.get.searchfield}=&quot;1&quot;}</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (cyberman)]]></author>
			<pubDate>Thu, 10 Oct 2013 14:24:05 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28121#p28121</guid>
		</item>
		<item>
			<title><![CDATA[Problem mit Variablen im Modulaufruf]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28120#p28120</link>
			<description><![CDATA[<p>Moin!</p><p>Ich möchte an einen Modulaufruf Variablen übergeben. Das funzt nur teilweise:</p><div class="codebox"><pre><code>{ListIt2 search=$smarty.get.search}</code></pre></div><p>funktioniert problemlos.</p><p>Aber</p><div class="codebox"><pre><code>{ListIt2 $smarty.get.searchfield=&quot;1&quot;}</code></pre></div><p>(soll {ListIt2 search_myfield=&quot;1&quot;} ergeben)</p><p>ergibt nen Fehler &quot;Unexpected &quot;$&quot;, expected one of: &quot;}</p><p>Wie krieg ich das denn da rein?</p><p>Servus,<br />Alex</p>]]></description>
			<author><![CDATA[dummy@example.com (faglork)]]></author>
			<pubDate>Thu, 10 Oct 2013 13:09:58 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28120#p28120</guid>
		</item>
	</channel>
</rss>
