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

View File

@ -66,7 +66,8 @@
<span id="toc-menu"><i class="fa fa-list-alt"></i></span> <span id="toc-menu"><i class="fa fa-list-alt"></i></span>
{{ end }} {{ end }}
<span class="links"> <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 }} {{ template "breadcrumb" dict "page" . "value" .Title }}
{{ else }} {{ else }}
{{ .Title }} {{ .Title }}