mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
taxonomy: avoid error if all term pages are hidden #685
This commit is contained in:
parent
7e28003401
commit
997e5c41d6
1 changed files with 3 additions and 1 deletions
|
@ -7,7 +7,9 @@
|
|||
{{- else if eq .Page.Kind "taxonomy" }}
|
||||
{{- /* go to first term page */}}
|
||||
{{- $pages := partialCached "partials/_relearn/pagesTaxonomy.gotmpl" . .Path }}
|
||||
{{- $next = (index $pages 0).Page }}
|
||||
{{- with index $pages 0 }}
|
||||
{{- $next = .Page }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- $next = partial "inline/next-page" . }}
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in a new issue