[SMARTY] if-else-routine bundled
Peggy Schatz <[email protected]> Thu, 16 Nov 2006 11:14:12 +0100
| Newsgroups | gmane.comp.php.smarty.general |
|---|---|
| Message-ID | <[email protected]> |
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.breite`px" 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
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php