Update docs

This commit is contained in:
Ivan Shalganov 2014-01-28 19:31:26 +02:00
parent 75bcc4e0ff
commit b34a1e1013
4 changed files with 22 additions and 11 deletions

View File

@ -77,8 +77,18 @@ See all [operators](./operators.md)
{$object->item->method($y->name, 'named')|upper} {* apply modifier to method result*}
```
You may disable call methods in template, see [security options](./settings.md)
You may disable call methods in template, see in [security options](./settings.md) option `deny_method`
### Static method support
```smarty
{Lib\Math::multiple x=3 y=4} static method as tag
{Lib\Math::multiple(3,4)} inline static method
{12 + Lib\Math::multiple(3,4)}
{12 + 3|Lib\Math::multiple:4} static method as modifier
```
You may disable call static methods in template, see in [security options](./settings.md) option `deny_static`
### Set variable

View File

@ -9,7 +9,7 @@ Tag {macro} [RU]
Обявление макроса происходит при помощи блочного тега `{macro}`
```smarty
{macro plus(x, y, z=0)}
{macro plus($x, $y, $z=0)}
x + y + z = {$x + $y + $z}
{/macro}
```

View File

@ -1,7 +1,8 @@
Tag {raw} [RU]
==================
Tag {raw}
=========
Тег `{raw <expression>}` позволяет выводить результат выражения или функций без экранирования, игнорируя глобальную настройку `auto_secape`.
Tag `{raw <expression>}` allow outputs render results without escaping.
This tag rewrite global option `auto_escape` for specified code.
```smarty
{autoescape true}
@ -15,7 +16,7 @@ Tag {raw} [RU]
{/autoescate}
```
Для результатов функций то же может быть отключено экранирование:
For functions use tag with prefix `raw:`:
```smarty
{autoescape true}
@ -26,4 +27,4 @@ Tag {raw} [RU]
{/autoescate}
```
На компиляторы свойство raw не распространяется.
Tag can not be applied to compilers as `foreach`, `if` and other.

View File

@ -1,5 +1,5 @@
{import 'macros.tpl' as mc}
A1
{mc.factorial num=10}
A2
{Ts\Math::multi x=34 y=44}
{$a + Ts\Math::multi(34, 44)}
{34|Ts\Math::multi:44}