Comment
Comment is statements that added at code to explain any or to give note. In Smarty we can use such as:
<Body>
{* this template use Smarty! *}
{* put any code at here! *}
</Body>
Method
Such as other classes, Smarty have methods. We can use smarty method to help our job. I just want to show a little and we will talk later.
<Body>
{config_load file="colors.conf"}
{include file="header.tpl"}
{if $somebody}
Wellcome, {$name}
{else}
Who are you?!?
{/if}
</Body>
Attribute
Such as HTML, in Smarty tag/command can have attribute. Example:
<Body>
{include file="footer.tpl"}
</Body>
Variable
<Body>
{func var="test $foo test"}
{func var="test $foo_bar test"}
{func var="test $foo[0] test"}
{func var="test $foo[bar] test"}
{func var="test $foo.bar test"}
{func var="test `$foo.bar` test"}
</Body>
Mathematic
<Body>
{$foo * $bar}
{$foo + $bar}
</Body>