Re: [SMARTY] Single string, with variable and text
| From: | Pieter Van Winckel | Date: | Tue, 14 Jan 2003 09:57:41 +0000 |
| Subject: | Re: [SMARTY] Single string, with variable and text | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7165@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 14 January 2003 10:08, you wrote about [SMARTY] Single string,
with variable and text to philippe.morange@ca-indosuez.com:
> Hi,
> I already asked this, but got no reply...
Then you had more time to read the man(or not?)
>
> I'd like to compose a single string made of a variable and some html, right
> inside Smarty brackets.
>
> For example:
> I assigned a variable to the template in a PHP file:
> $path = '/usr/local/include/templates/';
> $smarty->assign('path', $path);
>
> In the template I want to do that:
> {include file="/usr/local/include/templates/header.tpl"}
> BUT I want to use the $path variable...
> In PHP I would do $path."header.tpl"
So you would like something like?
{include file=#path#/header.tpl}
If you wan't something like this read about "config files"
But, i think I don't completly understand your problem,
maybe if you say what you are actually (in words) trying what you wan't to
do, maybe others could help too
>
> How could I do that in Smarty ? I would like not to use several variables,
> one for each different case...
>
> Thanks,
> Philippe.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE+I98XqI9/Du1wgKQRAqLCAJ4ubJyQ2TdGooNYp0C1MU4HY6eUCQCfeTGt
wKQYAOeCUCPlc4y22jkdwmE=
=9Pg1
-----END PGP SIGNATURE-----