What is Smarty?
Why use it?
Use Cases and Work Flow
Syntax Comparison
Template Inheritance
Best Practices
Crash Course
You may use the Smarty logo according to the trademark notice.
For sponsorship, advertising, news or other inquiries, contact us at:
Posizione del Parametro | Tipo | Obbligatorio | Default | Descrizione |
---|---|---|---|---|
1 | stringa | No | vuoto | Valore che viene concatenato alla variabile. |
Questo valore viene concatenato alla variabile data.
Example 5.4. cat
<?php $smarty = new Smarty; $smarty->assign('articleTitle', "Psychics predict world didn't end"); $smarty->display('index.tpl'); ?>
Dove index.tpl è:
{$articleTitle|cat:" yesterday."}
Questo stamperà:
Psychics predict world didn't end yesterday.