Skip to content

Commit

Permalink
Remove breadcrumbs for empty node pages (#1838)
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel authored Sep 15, 2023
1 parent 6eebc82 commit ca94555
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions layouts/docs/tutorials.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</aside>
<main class="col-12 col-md-9 col-xl-10 pl-md-5" role="main">
<div class="td-content">
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
<h1>{{ .Title }}</h1>
<div id="tutorial-menu" class="lozad">
<div id="tutorial-filters">
Expand Down
9 changes: 4 additions & 5 deletions layouts/partials/breadcrumb.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
{{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) -}}
{{ end -}}
{{ $isActive := eq .p1 .p2 }}
{{if .p1.Params.empty_node}}
{{ else }}
<li class="breadcrumb-item{{ if $isActive }} active{{ end }}"
{{- if $isActive }} aria-current="page"{{ end }}>
{{if .p1.Params.empty_node}}
{{ .p1.LinkTitle }}
{{ else }}
<a href="{{ .p1.Permalink }}">{{ .p1.LinkTitle }}</a>
{{ end }}
</li>
{{- end -}}
{{ end }}
{{- end -}}

0 comments on commit ca94555

Please sign in to comment.