From 3301f049cce898803a58397b2455c21698d3f3d1 Mon Sep 17 00:00:00 2001 From: Mischa Date: Sat, 20 Jun 2026 00:47:39 +0200 Subject: [PATCH] feat: apply GPX connector algorithm to dailies feed mini-map --- .../intotheeast/templates/dailies.html.twig | 38 ++++++++++++++++--- 1 file changed, 32 insertions(+), 6 deletions(-) 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 %}