do not count hidden pages in taxonomy pages #124
This commit is contained in:
parent
0c92c7b71a
commit
36f693a61c
1 changed files with 8 additions and 8 deletions
|
@ -4,15 +4,15 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h1>{{ i18n .Title }}</h1>
|
<h1>{{ i18n .Title }}</h1>
|
||||||
|
|
||||||
<ul class="terms">
|
<ul class="terms">
|
||||||
{{ range $key, $value := .Data.Terms }}
|
{{ range .Data.Terms }}
|
||||||
|
{{ $postsNum := len (where .Pages "Params.hidden" "!=" true) }}
|
||||||
|
{{ if gt $postsNum 0 }}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ (print $.Data.Plural "/" (lower $key)) | absLangURL }}">
|
<a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a>
|
||||||
{{ $key }}
|
({{ $postsNum }})
|
||||||
</a>
|
|
||||||
({{ len $value }})
|
|
||||||
</li>
|
</li>
|
||||||
|
{{ end}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue