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:
Table of Contents
List of Examples
php.ini
file
{block}
example
{block}
example
{block}
example
{$smarty.block.child}
example
{$smarty.block.parent}
example
{for}
loop
max
attribute
{forelse}
{foreach}
loop
key
variable
item
and key
index
example
iteration
example: is div by
iteration
example: is even/odd by
first
property example
last
property example
show
property example
total
property example
{break}
example
{continue}
example
loop
variable
index
property
index
, index_next
and index_prev
properties
iteration
property
first
and last
loop
show
property
total
property example
options
attribute
values
and
ouptut
extends: