fenom/docs/tags/macro.md
2013-03-04 10:13:59 +04:00

342 B

Tag {macro}

Declare macro

{macro plus(x, y, z=0)}
    x + y + z = {$x + $y + $z}
{/macro}

Invoke macro

{macro.plus x=$num y=100}

{import}

Import macro from another template

{import 'math.tpl'}
{import 'math.tpl' as math}
...
{math.plus x=5 y=100}