|
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 |
sticcino Smarty n00b
Joined: 19 Dec 2014 Posts: 1
|
Posted: Fri Dec 19, 2014 9:10 pm Post subject: can i assign to a smarty variable in a table field? |
|
|
Hi,
Just started using smarty....
not sure if this is possible, but i have a field that i read from the db into a variable which i pass to smarty to display on the form,
i have smarty tags inside of that field that i would like to fill when the template is run/loaded... is this possible, i've tried but nothing is displayed
for example:
in the table: field "footer" varchar 79
Thank you for using {mycompanyname}.
in php:
assign(mycompanyname, "hello world")
in .tpl
...stuff
<td>{mycompanyname}</td>
...stuff
Thanks,
johnny |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Fri Dec 19, 2014 9:38 pm Post subject: |
|
|
If you fetch a template code from DB, you need to work with it as with template.
But from here it looks like you are trying to create a mess.
Please start by reading Smarty documentation, and use only one source of templates at once, it'll make your life easier. |
|
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
|