mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-12-22 17:15:07 +01:00
use local scratch var in breadcrumbs
- fix undisplayed breadcrumbs in section pages having pagination
This commit is contained in:
parent
1a8e14a848
commit
034da04180
@ -4,10 +4,11 @@
|
||||
{{- $lang_url := replace $url ( printf "%s" .Lang) "" }}
|
||||
|
||||
<a href="{{ "" | absLangURL }}">{{ i18n "home" | default "Home"}}</a>
|
||||
{{- $scratch := newScratch }}
|
||||
{{- range $index, $element := split $lang_url "/" }}
|
||||
|
||||
{{- $.Scratch.Add "path" (printf "%s/" $element )}}
|
||||
{{- $bc_pg := $.Site.GetPage ($.Scratch.Get "path") -}}
|
||||
{{- $scratch.Add "path" (printf "%s/" $element )}}
|
||||
{{- $bc_pg := $.Site.GetPage ($scratch.Get "path") -}}
|
||||
|
||||
{{- if (and ($bc_pg) (gt (len . ) 0))}}
|
||||
{{- print " » " | safeHTML -}}<a href="{{ $bc_pg.Permalink }}">{{ $bc_pg.Name }}</a>
|
||||
|
Loading…
Reference in New Issue
Block a user