if-else-routine bundled

From: Date: Thu, 16 Nov 2006 10:14:12 +0000
Subject: if-else-routine bundled
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-13565@lists.php.net to get a copy of this message
Hello, in various templates and multiple times within templates I have the following construct: {if is_array($TemplateVar.value) } <td>{html_options name=$TemplateVar.name options=$TemplateVar.value selected=$selected class="bg$TemplateVar.farbe" style="width:$TemplateVar.breitepx" onchange=$TemplateVar.js}</td> {else} <td><input type="text" name="{$TemplateVar.name}" value="{$TemplateVar.value}" class="bg{$TemplateVar.farbe}" size="{$TemplateVar.breite}" {$TemplateVar.readstatus} /></td> {/if} I was wondering, whether there'd be a more convinient way to do that without performance loss. Would a plugin be a good idea? What (else) would you recommend?? Thanx in advance, Peggy

« previous php.smarty.general (#13565) next »