include in Smarty and display, please help
| From: | Nayra Quesada | Date: | Sat, 16 Apr 2005 00:14:57 +0000 |
| Subject: | include in Smarty and display, please help | ||
| Groups: | php.smarty.dev php.smarty.general | ||
| Request: | Send a blank email to php-smarty-dev+get-2705@lists.php.net to get a copy of this message | ||
Hi everyone!!
I have a trouble!!! Well, I explain you: I have two templates files: A.tlp
and B.tpl:
A.tpl:
{config_load file="configA.conf"}
{config_load file="configB.conf"}
.....
{include file="B.tpl"}
.....
{#var1#}
....
{#var2#}
.....
B.tpl:
code is generated from a php file which atack database and extracts
information. In database, elements are stored in format: {#value#}
.....
{section name=js_ObjInit_rows loop=$Obj}
this[{$smarty.section.js_ObjInit_rows.iteration}] = new
Object_({$Obj[js_ObjInit_rows.index][0]},"{$Obj[js_ObjInit_rows.index][1]}",
"{$Obj[js_ObjInit_rows.index][2]}");
{/section}
....
where,{$Obj[js_ObjInit_rows.index][1]} is {#object_name..#} and
{$Obj[js_ObjInit_rows.index][2]} is {#object_description...#}
Well, var1 and var2 are defined in configA.tpl and object_name.. and
object_description... are defined in configB.conf. When I display A.tpl,
var1 and var2 have correct value loaded from configA.conf, but object_name..
and object_description... are {#object_name..#} and
{#object_description...#}, but I want these two variables would have correct
values loaded from configB.conf.
Some solution please?? thanxsssss!!!!
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php