How to install smarty
Smarty is a known template engine. It has expanded library of functions to help you remove your template from the code .
To use Smarty as a standalone tool and avoid installing it server-side. Follow the steps below:
Now to test if Smarty is working.
First, create index.php and save it with the code below:
However I would like to learn how to create an own template engine/class, similar to the smarty one. Do you know how to achieve it? Any tutorial/article? Perhaps you can make a tutorial about it?
I had a quick look to smarty and found it excellent but after reading reviews, it has come to my attention that Smarty cons are more heavier than its pros.
1. You have to learn a new language called Smarty. (Different syntax than PHP).
2. It's a language therefore it has a complier, the compiler slows down the scripts.
PHP is a templating engine itself. If you want a simple templating class(like me) then use www.phpsavant.com v2 (for now until v3 has a documentation).
It is 100% faster and easier than Smarty.
|All times are GMT. The time now is 09:29 AM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0