From 5ef0e96d420cc94cba69eeeb81a25596315ec4ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sondre=20Gr=C3=B8n=C3=A5s?= <44143748+sondregronas@users.noreply.github.com> Date: Tue, 3 Sep 2024 19:55:20 +0200 Subject: [PATCH] fix: url in breadcrumbs --- piggy/templates/partials/parts/breadcrumbs.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/piggy/templates/partials/parts/breadcrumbs.html b/piggy/templates/partials/parts/breadcrumbs.html index 51b39dd..0b93984 100644 --- a/piggy/templates/partials/parts/breadcrumbs.html +++ b/piggy/templates/partials/parts/breadcrumbs.html @@ -31,12 +31,12 @@ {% for p in request.path.strip("/").split("/") if p %} {# If the path is the assignment prefix, we want to show the assignment name #} {% if p == ASSIGNMENT_URL_PREFIX %} - {% set url = request.base_url.split(p)[0] + ASSIGNMENT_URL_PREFIX %} + {% set url = "/" + request.base_url.split(p)[0].split(request.host_url)[1] + ASSIGNMENT_URL_PREFIX %} {% set p = "Oppgaver" %} {% elif loop.last %} {% set p = meta.name or meta.title %} {% else %} - {% set url = request.base_url.split(p)[0] + p %} + {% set url = "/" + request.base_url.split(p)[0].split(request.host_url)[1] + p %} {% set p = meta.get(get_template_name_from_index(loop.index)).name %} {% endif %}