#43, Add bookHidden page param to hide page from side menu

This commit is contained in:
Alex Shpak
2019-04-30 22:16:02 +02:00
parent 5b963180ab
commit ffd5e272a8
7 changed files with 66 additions and 15 deletions
+3 -3
View File
@@ -15,7 +15,7 @@
{{ end }}
{{ else }}
<ul>
{{ range $sections }}
{{ range where $sections "Params.bookhidden" "!=" true }}
{{ template "book-section" (dict "Section" . "CurrentPage" $.Permalink) }}
{{ end }}
</ul>
@@ -38,10 +38,10 @@
{{ define "book-section-children" }}
{{ with .Section }}
<ul>
{{ range .Sections }}
{{ range where .Sections "Params.bookhidden" "!=" true }}
{{ template "book-section" (dict "Section" . "CurrentPage" $.CurrentPage) }}
{{ end }}
{{ range .Pages }}
{{ range where .Pages "Params.bookhidden" "!=" true }}
<li>
{{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }}
</li>