mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 13:19:04 +08:00
taxonomy: avoid error if all term pages are hidden #685
This commit is contained in:
parent
7e28003401
commit
997e5c41d6
@ -7,7 +7,9 @@
|
|||||||
{{- else if eq .Page.Kind "taxonomy" }}
|
{{- else if eq .Page.Kind "taxonomy" }}
|
||||||
{{- /* go to first term page */}}
|
{{- /* go to first term page */}}
|
||||||
{{- $pages := partialCached "partials/_relearn/pagesTaxonomy.gotmpl" . .Path }}
|
{{- $pages := partialCached "partials/_relearn/pagesTaxonomy.gotmpl" . .Path }}
|
||||||
{{- $next = (index $pages 0).Page }}
|
{{- with index $pages 0 }}
|
||||||
|
{{- $next = .Page }}
|
||||||
|
{{- end }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- $next = partial "inline/next-page" . }}
|
{{- $next = partial "inline/next-page" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user