|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ILMV Smarty Rookie
Joined: 24 Dec 2008 Posts: 6
|
Posted: Wed Dec 24, 2008 8:54 pm Post subject: Smarty variables |
|
|
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 |
|
Celeb Administrator
Joined: 17 Apr 2007 Posts: 1025 Location: Vienna
|
Posted: Mon Dec 29, 2008 8:24 am Post subject: |
|
|
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 |
|
|
|
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
|