From 0a9dbce007812dfa54964adc1b0fd5d55b0578f2 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 14 May 2019 23:38:06 +0100 Subject: [PATCH] Move speaker role into a partial --- source/_includes/front-speakers.html.twig | 4 +--- source/_includes/speaker-role.html.twig | 3 +++ source/_layouts/speaker.html.twig | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 source/_includes/speaker-role.html.twig diff --git a/source/_includes/front-speakers.html.twig b/source/_includes/front-speakers.html.twig index c2c9335c2..9275295d1 100644 --- a/source/_includes/front-speakers.html.twig +++ b/source/_includes/front-speakers.html.twig @@ -9,9 +9,7 @@ {{ speaker.name }} - {{ speaker.role }} - {%- if speaker.role and speaker.organisation %}, {% endif %} - {{ speaker.organisation }} + {% include 'speaker-role' with { speaker: speaker } %} diff --git a/source/_includes/speaker-role.html.twig b/source/_includes/speaker-role.html.twig new file mode 100644 index 000000000..aef5d0a59 --- /dev/null +++ b/source/_includes/speaker-role.html.twig @@ -0,0 +1,3 @@ +{{ speaker.role }} +{%- if speaker.role and speaker.organisation %}, {% endif %} +{{ speaker.organisation }} diff --git a/source/_layouts/speaker.html.twig b/source/_layouts/speaker.html.twig index c5eea7909..e53340842 100644 --- a/source/_layouts/speaker.html.twig +++ b/source/_layouts/speaker.html.twig @@ -30,9 +30,9 @@ {% endif %}
- {% if page.organisation %} - Organisation: {{ page.organisation }} - {% endif %} +
+ {% include 'speaker-role' with { speaker: page } %} +
{% block content %}{% endblock %}