Re: [SMARTY] Double Variable in a Configvariable

From: Date: Mon, 15 Jan 2007 00:06:51 +0000
Subject: Re: [SMARTY] Double Variable in a Configvariable
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-13668@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, An alternative to the {#...#} syntax is the {$smarty.config...} syntax documented here: [1]. If you look at [2] you will see that you can nest variables. Putting that together something like the following should work: $phpvar = 'confivar' . $phpvar; (in your php file) {$smarty.config.$phpvar} (in your template) - -- 1: http://smarty.php.net/manual/en/language.config.variables.php 2: http://smarty.php.net/manual/en/language.syntax.variables.php Holger M. Stangl schrieb: > Hello and sorry, but I didn't find an answer in the documentation for my > problem ... so I ask here in the mailing list: > > I want to write a configuration variable with a normal variable from a > php-script: > {#configvar'$phpvar'#} > > Is this possible and how can I do that? > > Thanks a lot, > Holger > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFqsWarwsg9y2CBIURAly5AKCxjXSFoGgRXMnS/0qtopMHFAg7sACgneqx RiPFllhmies6I5vs3P7JY5k= =iaVH -----END PGP SIGNATURE-----

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