-}}
        {{- end -}}
    {{- end -}}
{{- end -}}

<ul class="breadcrumbs">
    {{- if and (ne $.Page.Section "services") (ne page.Section "posts") (ne page.Section "products") -}}
        {{- range page.Ancestors.Reverse -}}
            <li><a href="{{ .RelPermalink }}">{{ .Title | truncate 25 }}</a></li>
        {{- end -}}
        {{- if $parent_title -}}
            <li><a href="{{ $parent_link }}">{{ $parent_title | truncate 25 }}</a></li>
        {{- else -}}
            {{- if and (ne $parent_link 