fenom/docs/ru/tags/raw.md

28 lines
611 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Тег {raw}
=========
Тег `{raw <expression>}` позволяет вывести результат выражения без экранирования.
```smarty
{autoescape true}
...
{$var|up} {* escape *}
{raw $var|up} {* unescape *}
...
{"name is: <b>{$name|low}</b>"} {* escape *}
{raw "name is: <b>{$name|low}</b>"} {* unescape *}
...
{/autoescate}
```
Для функций используйте параметр тега `:raw`:
```smarty
{autoescape true}
...
{my_func page=5} {* escape *}
{my_func:raw page=5} {* unescape *}
...
{/autoescape}
```