Mailinglisten-Archive |
Hallo Lars,
Am 10.12.2003 12:47 Uhr schrieb "Lars Brinkmann" unter <lbrink at t-online.de>:
> {include file="test.tpl"}
>
> Ich möchte nun dem Parameter 'file' einen individuellen Wert
> ( $Wert="test.tpl" ) übergeben:
>
> {if $Wert}
> {include file=$Wert}
> {/if}
>
> Leider funktioniert das nicht. Meine Frage wäre nun, wie kann ich
> Smarty mitteilen, welche Datei eingebunden werden soll?
Setze die Variable in doublequotes.
Aus dem manuel:
Smarty will recognize assigned variables embedded in double quotes so long
as the variables contain only numbers, letters, underscores and brackets [].
With any other characters (period, object reference, etc.)
gruss
Olaf
--
Olaf Gleba | creatics media&systems
http://www.creatics.de | mailto:og at creatics.de
php::bar PHP Wiki - Listenarchive