The advantage for programmers is that they write the code in a PHP file without having to combine the instructions with HTML. Also, if the designer changes the layout of a page the programmer doesn't have to change the code to suit the new layout since the functionalities won't change. You perform your work in your files, assign to the templates all the values needed to print on the site and go out for a beer.
The PHP file you need to include the Smarty class require 'Smarty.class.php'. After that you instantiate the smarty with $smarty = new Smarty.
To assign a variable to the template you need to $smarty->assign('UserName', 'Jeff Adams'). After everything is finished you call the method and to display the template $smarty->display('index.tpl').
Search Engine Genie is an Ethical Search Engine Optimization
Company Specializing in Search Engine Marketing, Search Engine
Promotion and Search Engine Ranking Services.
Post a Comment