Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty variables

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
ILMV
Smarty Rookie


Joined: 24 Dec 2008
Posts: 6

PostPosted: Wed Dec 24, 2008 8:54 pm    Post subject: Smarty variables Reply with quote

Hello All!

I am dragging in some data from a database to output via Smarty.

I am aware I can use variables such as {$SCRIPT_NAME} in my template files, but I want to do the same with the content coming from my database table.

But how do I make these types of variables work if I am not adding them directly into the template.



I hope that makes sense, I can explain more if needed.


Cheers!
ILMV
Back to top
View user's profile Send private message
Celeb
Administrator


Joined: 17 Apr 2007
Posts: 1025
Location: Vienna

PostPosted: Mon Dec 29, 2008 8:24 am    Post subject: Reply with quote

You need to assign() them prior to your display() call.

http://www.smarty.net/manual/en/api.assign.php
_________________
Darn computers always do what I tell them to instead of what I want them to do.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General 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