From 30746a06028debec9407e81ee4fe514eb8cc2081 Mon Sep 17 00:00:00 2001 From: Zeni Kim Date: Mon, 28 Apr 2025 00:11:04 -0500 Subject: [PATCH] check child items to active nav --- template/components/page_nav.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/template/components/page_nav.html b/template/components/page_nav.html index 08faaf4..5c34fad 100644 --- a/template/components/page_nav.html +++ b/template/components/page_nav.html @@ -3,9 +3,15 @@ {{range $item := .NavItems}} {{if gt (len $item.ChildItems) 0}} + {{ $hasActiveChild := false }} + {{range $child := $item.ChildItems}} + {{if $child.IsActive}} + {{ $hasActiveChild = true }} + {{end}} + {{end}}