From d6a328d0c37e3e8bdcace8af7862833b6491cc8f Mon Sep 17 00:00:00 2001 From: kpaxman <kpaxman@uwaterloo.ca> Date: Wed, 2 Jun 2021 17:17:04 -0400 Subject: [PATCH] ISTWCMS-4818: check if all pieces of education exist, to avoid double commas like in 'dberry' --- source/_patterns/03-layouts/ofis/ofis.twig | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/source/_patterns/03-layouts/ofis/ofis.twig b/source/_patterns/03-layouts/ofis/ofis.twig index eb29708e..70870e76 100644 --- a/source/_patterns/03-layouts/ofis/ofis.twig +++ b/source/_patterns/03-layouts/ofis/ofis.twig @@ -43,8 +43,20 @@ <h2>Education</h2> <ul> {% for degree in ofis_data.education %} - <li>{{ degree.degree_yr }}, {{ degree.degree_name }}, {{ degree.name_of_discipline }} - , {{ degree.institution }}</li> + <li> + {% if degree.degree_yr %} + {{ degree.degree_yr }}, + {% endif %} + {% if degree.degree_name %} + {{ degree.degree_name }}, + {% endif %} + {% if degree.name_of_discipline %} + {{ degree.name_of_discipline }}, + {% endif %} + {% if degree.institution %} + {{ degree.institution }} + {% endif %} + </li> {% endfor %} </ul> {% endif %} -- GitLab