For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > April 2005 > include in Smarty and display, please help









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author include in Smarty and display, please help
Nayra Quesada

2005-04-15, 8:59 pm

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!!!!
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com