Comment example

[* it is comment]
...

Condition example

		[if count($.server) > 1]
			server name = [.server.SERVER_NAME]
[else] [.server.SERVER_NAME] [/if]
server name = helldude.ru

Delimiters escaping

		[[ && ]]
	
[ && ]

ForEach block + htmlspecialchars(:) + urlencode(::)

if 'id' is empty, id="_id"

		[&items _id]
			

[_item] ([_id]) = htmlspecialchars:[:_item] = urlencode[::_item]

[/&]

10 (0) = htmlspecialchars—10 = urlencode—10

20 (1) = htmlspecialchars—20 = urlencode—20

ахуеть!<> (2) = htmlspecialchars—ахуеть!<> = urlencode—%D0%B0%D1%85%D1%83%D0%B5%D1%82%D1%8C%21%3C%3E

Function test

Simple algo - if user added special function to template engine, it will be executed, else will be executed PHP function

		.server.REMOTE_ADDR = [@substr .server.REMOTE_ADDR 4]
		.server.REMOTE_ADDR LENGTH = [@strlen .server.REMOTE_ADDR]
		...
		and PHP CODE: $tpl->add_user_function("strlen",create_function('$x','return "А ВОТ ХУЙ ВАМ!";'));
	

.server.REMOTE_ADDR = 07.179.240

.server.REMOTE_ADDR LENGTH = А ВОТ ХУЙ ВАМ!

Block function test

Here used only added functions. Because they take smart params: $this(DudeTpl object), $repeat(second time execution?), $content(block content or false)[, $param1, $param2(block params)]

		[#hash md5 $.server.REMOTE_ADDR]
			here is test string
		[/#]
		...
		and PHP CODE: $tpl->add_user_function("strlen",create_function('$x','return "А ВОТ ХУЙ ВАМ!";'));
	
8d0ab694de8a0b5874c302dfebbe8959 5baa434da107da7e6656bd42981975b4c3eb422f
Generation time — 0.040554046630859