Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

:roll: Help! PHP Code from different file into Smarty...

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
Albert Wesker
Smarty Rookie


Joined: 03 Jun 2003
Posts: 6

PostPosted: Thu Jul 03, 2003 2:47 pm    Post subject: :roll: Help! PHP Code from different file into Smarty... Reply with quote

I have a file named "parameter.php". In that file all the parameter for the Web Navigator is stored.
Now that data is needed in two different files of that site to build the Navigator.

My Problem is ->

In my 'Index.tpl' i have already included the two different files (assign) to build the Navigator. That works fine - at least the HTML Code in there is visible. If i include the "parameter.php" also per Index.tpl to show the Navigator - the Navigator does not work because none of the infos from the "parameter.php" is available in the two different files.

How can i make that parameter infos available?
If i paste the infos from the parameter.php into the two different files everything work fine...


Sorry if this is a bit confusing - its a bit difficult to explain. I tested many things - maybe anyone can help me? Rolling Eyes
Back to top
View user's profile Send private message
BloodRath
Smarty Rookie


Joined: 06 Jul 2003
Posts: 23
Location: France

PostPosted: Sat Jul 12, 2003 1:25 am    Post subject: Reply with quote

sorry i don't understand anything could u give an example pls

i have a problem with javascript inclusion : how not to include same .js x time, i use this trick

create a new function assign_array
store in this array in a template the list of javascript to include,

{assign_array var="script['a']" value ="../js/1k_standards.js"}
{assign_array var="script['b']" value ="../js/canvasSize.js"}

call the header of the html page, which himself write the assigned array to the html with a classical foreach

i don't think if it could help u, sorry if it couldn't
_________________
froggies forever.... Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP