mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
18 lines
260 B
Markdown
18 lines
260 B
Markdown
Tag {macro}
|
|
============
|
|
|
|
Declare macro
|
|
|
|
```smarty
|
|
{macro plus(x, y, z=0)}
|
|
x + y + z = {$x + $y + $z}
|
|
{/macro}
|
|
```
|
|
|
|
Invoke macro
|
|
|
|
```smarty
|
|
{macro.plus x=$num y=100}
|
|
```
|
|
|
|
Use tag [{import}](./import.md) for importing existing macroses into another template |