![]() |
#2
|
||||
|
||||
![]()
I'm currently enjoying the joys of Smarty, after having to use it for a class this semester. I will see if I can explain this well! :D
Basically Smarty is a way to code a template without putting PHP and HTML together. You basically need to assign a PHP variable into a Smarty variable, to be able to use it in a .tpl I usually set my variables in class_template.php's assignTemplateVars() function with PHP Code:
PHP Code:
PHP Code:
-------------- To assign the loggedin variable to a Smarty variable called logged_in in class_template.php: PHP Code:
More examples (in class_template.php): PHP Code:
__________________
![]() ![]() ![]() asp.net stole my soul. |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Smarty Tips: Things you can do with Templates | Kyttias | Tutorials and Tips | 5 | 04-03-2015 10:53 AM |
Assigning array to smarty variables | IntoRain | Questions and Supports | 3 | 06-03-2014 02:06 PM |
Smarty errors and WAMPP | Kesstryl | Questions and Supports | 15 | 01-29-2014 09:07 PM |
Problem: smarty class 1.3.4 | draugluin | Questions and Supports | 8 | 11-15-2013 02:29 AM |
What's New? |
What's Hot? |
What's Popular? |