<!DOCTYPE html>
<html lang="en">
<head>
	<title>Test</title>
	<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>

    {* This is a comment *}

	<h1>Test Rain Tpl {$version}</h1>
	<hr>

	<h2>Variables</h2>
	Variable: {$variable} <br><br>
	Init Variable {$v = 10} <br><br>
	Show Variable {$v} <br><br>
	Modifier {$variable|strlen} <br><br>
	Cascade Modifier {$variable|substr:2,5|strlen} <br><br>
	Scoping (object) {$user->name} <br><br>
	Scoping (array) {$week.0} <br><br>
	Variable as key {$week[$numbers.0]} <br><br>
	Var test {$variable} <br><br>


	<h2>Loop</h2>
	Simple Loop
	<ul>
		{loop="$week"}
		<li>
			{$key} {$value}
		</li>
		{/loop}
	</ul><br><br>

	Modifier on Loop
	<ul>
		{loop="$week|array_reverse" as $i}
		<li>{$i}</li>
		{/loop}
	</ul><br><br>

	Simple Nested Loop
	<ul>
		{loop="$table"}
		<li>
			{loop="$value"}
			{$value},
			{/loop}
		</li>
		{/loop}
	</ul><br><br>

	Loop on created array
	<ul>
		{loop="range(5,10)" as $i}
		<li>{$i}</li>
		{/loop}
	</ul><br><br>

	<h2>If</h2>
	True condition: {if="true"}This is true{/if} <br><br>
	Modifier inside if: {if="$variable|is_string"}True{/if} <br><br>


	<h2>Function test</h2>
	Simple function: {function="time"} <br><br>
	Function with parameters: {function="date('d-m-Y')"} <br><br>
	Static method: {function="Test::method('123test')"} <br><br>

	<h2>Escape Text</h2>
	Malicious content: {$bad_text} <br><br>

	<h2>Custom tag</h2>
	{@message to translate@} <br><br>

	<h2>Custom tag 2</h2>
	{%message to translate|english%} <br><br>

</body>
</html>