[…] <input type="text" name="first_name" value="{$first_name}" /> <!DOCTYPE html> <html> […] First name: John <br> <input type="text" name="first_name" value="John" /> […] Template file Final HTML - Placeholders are substituted with actual values
logic - Particularly important for projects where the roles of designers and developers are separated - Easier maintenance of large projects - HTML extended with Smarty variables and control statements in between {…}
{foreach} - loop, e.g., for displaying arrays - {if} - {include} - including another smarty file - {literal} - JavaScrips or CSS content (that contains { or } chars) needs to be in between {literal}..{/literal}
under www root - Set up required folder structure under PHP project dir Smarty setup examples/php/smarty/README.md need to be writable by the web server