mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-30 19:35:26 +01:00 
			
		
		
		
	use local scratch var in breadcrumbs
- fix undisplayed breadcrumbs in section pages having pagination
This commit is contained in:
		| @@ -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> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Aditya Telange
					Aditya Telange