mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-12-29 08:56:17 -05:00
19 lines
643 B
HTML
19 lines
643 B
HTML
{{- if (.Param "ShowBreadCrumbs")}}
|
|
<div class="breadcrumbs">
|
|
{{- $url := replace .Parent.Permalink ( printf "%s" .Site.BaseURL) "" }}
|
|
{{- $lang_url := replace $url ( printf "%s" .Lang) "" }}
|
|
|
|
<a href="{{ "" | absLangURL }}">{{ i18n "home" | default "Home"}}</a>
|
|
{{- range $index, $element := split $lang_url "/" }}
|
|
|
|
{{- $.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>
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
</div>
|
|
{{- end }}
|