Re: [SMARTY] variable name problem
| From: | Luc Saint-Elie | Date: | Wed, 07 May 2003 08:46:51 +0000 |
| Subject: | Re: [SMARTY] variable name problem | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9490@lists.php.net to get a copy of this message | ||
Hello Guillaume,
In case this could help I've a application with a automatic detection of templates in a directory and an array of templates is send to the main template :
in the php file :
// Left blocs
$templates_l =getDirArray(BASEPATH.'/templates/blocs/left/');
$smarty->assign('directory_l','blocs/left');
$smarty->assign('left',$templates_l);
in the template :
{section name=masection loop=$left}
{include file=$directory_l/$left[masection]}
{/section}
As you can see I use no separator
Luc
At 09:41 07/05/03 +0100, Guillaume Justier wrote:
Hi guys, I have a problem with variable names. Within a loop I have the following line: {label for="FORM_CHRG_".{$searchloop[mysc].PK}."_TITLE"} Is this the correct syntax to generate the variable name (for example : {label for="FORM_CHRG_3_TITLE"}) Thanks in advance, Guillaume