![]() |
what is SMARTY
hi
i always heard about SMARTY AND WHEN I DOWNLOAD A SCRIPT I SEE SMARTY FOLDER so can someone tell me what is SMARTY ??? |
Smarty is what is known as a "template engine". In other words, if you put all your data-gathering in one place you can then send the information for a page to the templates you make with Smarty, and get a page generated neatly every time. Some template engines slow you down, but Smarty's templates actually compile into PHP, so there is little difference if you use them or not. Just more flexibility to your interface without changing your backend code.
|
Best way to find out what anything is: Google. :-D
Type 'define:Smarty' (without the quotes) into a Google search box and get this page: Google definition of smarty with links In short, Smarty is a web template system written in PHP. Smarty separates PHP, as a business logic, from HTML, a presentation logic, and generates web content by the placement of special Smarty tags within a document (i.e. variable substitution). I have never used it though. |
yeah thanks but from i see that SMARTY help you mix php with the design right
and if so how to do that plz |
That's too complex for us to just teach you, I'd suggest you read the documentation that comes with smarty: Smarty : Documentation
|
ok thanks robert ;)
but smarty is to mix php with the design ? |
Yes and no, it has its own language and syntax that then gets interpreted, by SMARTY, into PHP. You only mix the design and the display, not the data gathering.
|
anyway thanks
;) |
Basically you have your PHP and your HTML separate from each other, which makes it easier to edit.
You make your HTML file, and a lot of people give it the file extention .tpl, which stands for 'template', which is what it is.Then in the PHP file, you would do something like this to show the HTML page via the PHP page. PHP Code:
|
hi thanks man for the tips im gonna read the documentation that will help me mix the php and design
|
Well what SMARTY does is separate the php and design, but I'm guessing you get the basic idea anyways.
|
| All times are GMT. The time now is 05:09 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0