Aniket Teredesai 6e1b938d43 add hiddenPage param
with this param set to true, every effort is made to make the page 'undiscoverable'
2023-04-26 16:01:17 +05:30

21 lines
660 B
HTML

{{ define "main" }}
<div class="terms">
<h1>{{ .Title }}</h1>
<ul>
{{ $type := .Type }}
{{ range $term := .Data.Terms.Alphabetical }}
{{ $termPages := (.Pages | symdiff (where .Pages "Params.hiddenPage" "==" "true")) | symdiff (where .Pages "Params.hiddenPage" true) }}
{{ if (len $termPages | ne 0) }}
{{ $name := $term.Name }}
{{ $count := len $termPages }}
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
<li>
<a class="terms-title" href="{{ .Permalink }}">{{ .Name }} ({{ $count }})</a>
</li>
{{ end }}
{{ end }}
{{ end }}
</ul>
</div>
{{ end }}