What don't you get about the main idea? The main idea of a template engine is to let you abstract, make variable or immaterial (not concrete), your interface to files that can be edited apart from your source. What you do in your script for a page is gather your data, then
assign it to Smarty:
PHP Code:
$smarty = new Smarty();
$smarty->assign('firstname', 'Doug');
$smarty->assign('lastname', 'Evans');
$smarty->assign('meetingPlace', 'New York');
$smarty->display('index.tpl');
If your template looks like the following, the output after it will be seen.
smarty Code:
Hello {$firstname} {$lastname}, glad to see you can make it.
<br />
{* this will not work as $variables are case sensitive *}
This weeks meeting is in {$meetingplace}.
{* this will work *}
This weeks meeting is in {$meetingPlace}.
Becomes:
HTML Code:
Hello Doug Evans, glad to see you can make it.
<br />
This weeks meeting is in .
This weeks meeting is in New York.
This is to separate your data from the display, so that your interface and code are more flexible. The template doesn't care who gave it the data, just that it is there. And your script doesn't really care where the data came from, so long as it fits your requirements and rules (for security mostly).
If you can describe your confusion better, perhaps I can helpyou. Otherwise, I do know that Smarty has a
support forum in French, if you know it better than English.