Side menu progress bar: also include isLesson leaf pages in progress calculation

This commit is contained in:
Abdon Pijpelink
2026-03-16 15:32:00 +01:00
parent af4e1a054f
commit 15daf4aec0
@@ -40,7 +40,19 @@
{{ end }} {{ end }}
{{ if or (eq $currentNode.Params.isLesson true) (eq $currentNode.Parent.Params.isLesson true) }} {{ if or (eq $currentNode.Params.isLesson true) (eq $currentNode.Parent.Params.isLesson true) }}
{{ $allLessons := where $subject.Pages ".Params.isLesson" true }} {{ $allLessons := slice }}
{{ range $subject.Pages }}
{{ if .Params.isLesson }}
{{ $allLessons = $allLessons | append . }}
{{ end }}
{{ if .IsSection }}
{{ range .Pages }}
{{ if .Params.isLesson }}
{{ $allLessons = $allLessons | append . }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ $total := len $allLessons }} {{ $total := len $allLessons }}
{{ if $total }} {{ if $total }}