diff --git a/themes/intotheeast/templates/dailies.html.twig b/themes/intotheeast/templates/dailies.html.twig index 68d415d..529b9bf 100644 --- a/themes/intotheeast/templates/dailies.html.twig +++ b/themes/intotheeast/templates/dailies.html.twig @@ -23,11 +23,21 @@ 'lng': item.page.header.lng, 'title': item.page.title, 'slug': item.page.slug, - 'url': item.page.url + 'url': item.page.url, + 'force_connect': item.page.header.force_connect ? true : false }]) %} {% endif %} {% endfor %} +{# Collect GPX URLs from parent trip page for connector algorithm #} +{% set trip_page = page.parent() %} +{% set gpx_urls = [] %} +{% for name, media in trip_page.media.all %} + {% if name|split('.')|last == 'gpx' %} + {% set gpx_urls = gpx_urls|merge([trip_page.url ~ '/' ~ name]) %} + {% endif %} +{% endfor %} + {% if map_entries|length > 0 %}
@@ -36,9 +46,11 @@ + {% endif %}