mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
342 B
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}