{* This is a comment *}
Test Rain Tpl {$version}
Variables
Variable: {$variable}
Init Variable {$v = 10}
Show Variable {$v}
Modifier {$variable|strlen}
Cascade Modifier {$variable|substr:2,5|strlen}
Scoping (array) {$week.0}
Var test {$variable}
Loop
Simple Loop
{loop="$week"}
-
{$key} {$value}
{/loop}
Modifier on Loop
{loop="$week|array_reverse" as $i}
- {$i}
{/loop}
Simple Nested Loop
{loop="$table"}
-
{loop="$value"}
{$value},
{/loop}
{/loop}
Loop on created array
{loop="range(5,10)" as $i}
- {$i}
{/loop}
If
True condition: {if="true"}This is true{/if}
Modifier inside if: {if="$variable|is_string"}True{/if}