From 256abc59b3d28cecfa22703312d7ebded0cd2df1 Mon Sep 17 00:00:00 2001 From: GZod01 Date: Sun, 18 Aug 2024 15:56:47 +0200 Subject: [PATCH] he --- layouts/partials/header.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 41fb152..de706ac 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -31,18 +31,18 @@ {{ $current := . }} {{ range .Site.Menus.main.ByWeight }} {{ $active := "" }} -{{ $menu_item_url := .URL | relLangURL }} +{{ $menu_item_url := (.URL | relLangURL) }} {{ $page_url:= $current.RelPermalink | relLangURL }} {{ if eq $menu_item_url $page_url }} {{ $active = "active" }} {{ end }} -{{ if (and (hasPrefix $page_url $menu_item_url) (not (eq $menu_item_url "/"))) }} +{{ if (and (hasPrefix $page_url $menu_item_url) (not (eq $menu_item_url ("/" | relLangURL)))) }} {{ $active = "active" }} {{ end }}
{{ $title := .Title }} {{ with (index site.Params .Identifier) }}