With the code below, I would like to prevent the breadcrumb from appearing on the homepage (without using CSS to hide it). I am using the code in a partial which is borrowed from this forum.
<span class="breadcrumb">
<a href="/">Home</a>
{{ template "breadcrumb" dict "currentPage" .Page "id" .File.UniqueID }}
</span>
<!-- templates -->
{{ define "breadcrumb" }}
{{ $page := .currentPage }}
{{ if $page.Parent }}
{{ if ne $page.Parent .IsHome }}
{{ template "breadcrumb" dict "currentPage" $page.Parent }}
{{ end }}
{{ if eq .id $page }}
{{ $page.Title }}
{{ else }}
<a href="{{ $page.RelPermalink }}">{{ $page.Title }}</a> <span class="tick">»</span>
{{ end }}
{{ end }}
{{ end }}