Newer
Older
Inserts the abbreviation of an organization of a person, followed by a
slash, if something was printed at all.
Assumes that there is a variable "person" already defined.
It holds a key "organization" and an associated value which is a foreign key
into _data/hifis_organizations.yml
If the key is not present, an informative HTML comment will be inserted.
{%- assign person = include.person -%}
{%- if person -%}
{%- if person.location.campus -%}
{%- assign organization = site.data.helmholtz-centers[person.location.campus] -%}
{%- if organization -%}
<!-- NOTE: No further organization info, fallback to verbatim input -->
<em>{{ person.location.campus }}</em>
<!--
NOTE: team_card/organization_short.html was included,
but person.organization was not defined
-->
{%- endif -%}
{%- else -%}
<!--
WARNING: team_card/organization_short.html was included,
but no person object was defined
-->