Hi there,
I have upgraded the actual breadcrumb code to take into account sections branches as well.
This way even branches section elements get the active tag.
By comparing the last URL element :
{{ $lastUrlElement := index (last 1 (split (delimit (split .RelPermalink “/”) “,” “”) “,”)) 0 }}
<nav class="" aria-label="breadcrumb ">
<ol class="breadcrumb justify-content-center">
<li class="breadcrumb-item"><a href="/">{{i18n "Home" }}</a></li>
{{ $lastUrlElement := index (last 1 (split (delimit (split .RelPermalink "/") "," "") ",")) 0 }}
{{- $.Scratch.Set "url" "" -}}
{{- range (split .RelPermalink "/") -}}
{{- if (gt (len .) 0) -}}
{{- $.Scratch.Set "isSection" "false" -}}
{{- $.Scratch.Set "isPage" "false" -}}
{{- $.Scratch.Add "url" (print "/" . ) -}}
{{- if $.Site.GetPage (print . ".md") -}}
{{- with $.Site.GetPage (print . ".md") -}}
{{- if .IsPage -}}
{{- $.Scratch.Set "isPage" "true" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if eq ($.Scratch.Get "isPage") "true" -}}
{{- with $.Site.GetPage (print . ".md") -}}
<li class="breadcrumb-item active" aria-current="page"><a href="{{ $.Scratch.Get `url` }}">
{{ if (eq (i18n .Title) "" ) }} {{ .Title }}{{ else }}{{ i18n .Title }}{{ end }}</a></li>
{{- end -}}
{{- else -}}
{{- if eq $lastUrlElement . -}}
<li class="breadcrumb-item active"><a href="{{ $.Scratch.Get `url` }}">{{ if (eq (i18n (humanize . )) "" ) }} {{ humanize .}}{{ else }}{{ i18n (humanize . ) }}{{ end }}</a></li>
{{- else -}}
<li class="breadcrumb-item"><a href="{{ $.Scratch.Get `url` }}">{{ if (eq (i18n (humanize . )) "" ) }} {{ humanize .}}{{ else }}{{ i18n (humanize . ) }}{{ end }}</a></li>
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
</ol>
</nav>
Hope it helps someone.