I’m trying to use breadcrumb partial, but I keep getting this warning:
Page.UniqueID is deprecated and will be removed in a future release. Use .File.UniqueID
This is my breadcrumb code:
<ul class='uk-breadcrumb'>
<li>
<a href="/">Home</a>
</li>
<li>
{{ template "breadcrumb" dict "currentPage" .Page "id" .UniqueID }}
</li>
</ul>
{{ define "breadcrumb" }}
{{ if .currentPage.Parent }}
{{ if ne .currentPage.Parent .IsHome }}
{{ template "breadcrumb" dict "currentPage" .currentPage.Parent }}
{{ end }}
{{ if eq .id .currentPage.UniqueID }}
{{ .currentPage.Title }}
{{ else }}
<a href="{{ .currentPage.URL }}">{{ .currentPage.Title }}</a> >
{{ end }}
{{ end }}
{{ end }}
I tried to replace ‘.Page’ with ‘.File’ but when I do that I get an error. Is there any way to resolve it without getting warnings?