changes so can now use page params as well as site

This commit is contained in:
willwade 2018-03-19 10:40:10 +00:00
parent 6d6fde35b9
commit a29add8d5e
2 changed files with 12 additions and 9 deletions

View file

@ -39,14 +39,16 @@
{{ end }}
{{ end }}
{{if ne .Site.Params.disableNextPrev true }}
{{with ($.Scratch.Get "prevPage")}}
<a class="nav nav-prev" href="{{.URL}}" title="{{.Title}}"> <i class="fa fa-chevron-left"></i></a>
{{end}}
{{with ($.Scratch.Get "nextPage")}}
<a class="nav nav-next" href="{{.URL}}" title="{{.Title}}" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>
{{end}}
{{end}}
{{$showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev))}}
{{if $showPrevNext}}
{{with ($.Scratch.Get "prevPage")}}
<a class="nav nav-prev" href="{{.URL}}" title="{{.Title}}"> <i class="fa fa-chevron-left"></i></a>
{{end}}
{{with ($.Scratch.Get "nextPage")}}
<a class="nav nav-next" href="{{.URL}}" title="{{.Title}}" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>
{{end}}
{{end}}
</div>
</section>

View file

@ -66,7 +66,8 @@
<span id="toc-menu"><i class="fa fa-list-alt"></i></span>
{{ end }}
<span class="links">
{{if ne .Site.Params.disableBreadcrumb true}}
{{$showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb))}}
{{if $showBreadcrumb}}
{{ template "breadcrumb" dict "page" . "value" .Title }}
{{ else }}
{{ .Title }}