Files
util.nix/package/c/hmpl
..
2025-04-07 16:54:26 +00:00
2025-04-05 19:09:13 +00:00
2025-04-07 16:54:26 +00:00
2025-04-07 16:54:26 +00:00
2025-04-07 16:54:26 +00:00
2025-04-05 17:04:29 +00:00
2025-03-24 13:36:31 +00:00
2025-04-04 02:09:43 +00:00

interpolation tag

context

  {
    "name": "Ioan", 
    "person": { "name": "Oleg" }, 
    "family": {"person": { "name": "Taras" }}, 
  }

template

  {{name}}
  {{person.name}}
  {{family.person.name}}

result

  Ioan
  Oleg
  Taras

section/iteration tag

context

  {
    "person": {"name": "persons"},
    "persons": [
      {"name": "Ioan", "number": 2}, 
      {"name": "Oleg", "number": 1}, 
    ]
  }

template # raise_exception

  {{#{{person.name}} p}}
    {{p.name}} is {{p.number}}
  {{/persons}}

result

  Ioan is 2
  Oleg is 1

include tag

json

template

  {{>template_name}}

result

Order

used plain render interpolation->section->include

so you cannot render interpolation in interpolation or section

Not allowed:

{{name_{{subname}}}}
{{#array_{{subname}}}}

But:

{{>{{template_name}}}}

allowed;

№ эксепшн на нераскрытые