{# Template to render a person OPTIONS * render string ['raw'|'label'|'bloc'] * addAltNames bool * addLink bool * addEntity bool * addId bool * addInfo bool * addAge bool * addCenter bool * hLevel integer * address_multiline bool * customButtons [ 'before' Twig\Markup, (injected with macro) 'replace' Twig\Markup, 'after' Twig\Markup ] #} {% macro raw(person, options) %} {{ person.firstName }} {{ person.lastName }} {%- if options['addAltNames'] -%} {%- for n in person.altNames -%} {{- n.label -}} {%- endfor -%} {%- endif -%} {% endmacro raw %} {% macro label(person, options) %}
{%- if person.deathdate is not null -%} {%- else -%} {%- if options['addAge'] -%} {{ 'years_old'|trans({ 'age': person.age }) }} {%- endif -%} {%- endif -%}
{%- endif -%} {#- tricks to remove easily whitespace after template -#} {%- if true -%}