Re: [SMARTY] Double Variable in a Configvariable
Danilo Buerger <[email protected]> Mon, 15 Jan 2007 01:06:51 +0100
| Newsgroups | gmane.comp.php.smarty.general |
|---|---|
| Message-ID | <[email protected]> |
-----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-----
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php