Single string, with variable and text
| From: | philippe dot morange at ca-indosuez dot com | Date: | Tue, 14 Jan 2003 09:08:24 +0000 |
| Subject: | Single string, with variable and text | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-7164@lists.php.net to get a copy of this message | ||
Hi,
I already asked this, but got no reply...
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"
How could I do that in Smarty ? I would like not to use several variables, one for each different
case...
Thanks,
Philippe.