Skip to content

Commit

Permalink
Merge pull request #1360 from gethinode/develop
Browse files Browse the repository at this point in the history
Fix identification of active child navbar item
  • Loading branch information
markdumay authored Jan 12, 2025
2 parents ddc319e + d833620 commit 25aeaeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/assets/navbar-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{{- $menuURL = partial "utilities/URLJoin.html" (dict "base" $baseURL "path" ((or $menu.PageRef $menu.URL) | relLangURL)) -}}
{{ end }}
{{- $pageURL := $page.RelPermalink -}}
{{- $isActive := or (and (hasPrefix $pageURL $menuURL) (ne $menuURL ("/" | relLangURL))) (eq $pageURL $menuURL) -}}
{{- $isActive := or (and (eq $pageURL $menuURL) (ne $menuURL ("/" | relLangURL))) (eq $pageURL $menuURL) -}}
{{ if not $menu.PageRef }}{{ $isActive = false }}{{ end }}
{{- $isAlias := $menu.Params.alias -}}
{{- $isIcon := $menu.Params.icon -}}
Expand Down

0 comments on commit 25aeaeb

Please sign in to comment.