render_box: adding addAge option

This commit is contained in:
2021-07-30 11:13:54 +02:00
parent 175d6892ec
commit 08cd6c81f2
3 changed files with 8 additions and 5 deletions

View File

@@ -7,6 +7,7 @@
* addEntity bool
* addId bool
* addInfo bool
* addAge bool
* hLevel integer
* customButtons [
'before' Twig\Markup, (injected with macro)
@@ -60,6 +61,11 @@
{{ 'Born the date'|trans({'gender': person.gender,
'birthdate': person.birthdate|format_date("medium") }) }}
</time>
{%- if options['addAge'] -%}
<span class="age">
{{ person.age ~ ((person.age > 1) ? ' ans' : ' an') }}
</span>
{%- endif -%}
</p>
{%- endif -%}
{#- tricks to remove easily whitespace after template -#}