{{ $currentSect := default .Page.Section .Page.Params.BookSection}} {{ $sections := where .Site.Sections "Section" .Page.Section}} {{ define "book-section" }} {{ with .Section }}
  • {{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }} {{ template "book-section-children" (dict "Section" . "CurrentPage" $.CurrentPage ) }}
  • {{ end }} {{ end }} {{ define "book-section-children" }} {{ with .Section }} {{ end }} {{ end }} {{ define "book-page-link" }} {{ with .Page }} {{ if ne .Params.bookhidden true }} {{ .Title }} {{ end }} {{ end }} {{ end }}