From 2fd986166e139a7795d49535c5276c0fe633dbe9 Mon Sep 17 00:00:00 2001 From: will wade Date: Wed, 14 Mar 2018 00:28:37 +0000 Subject: [PATCH 1/3] adding .Site.Params.disableBreadcrumb NB: Still shows heading of page. Otherwise looks a bit ugly --- layouts/partials/header.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index de16c932e8..503e196d1a 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -62,11 +62,15 @@ - {{ if $toc }} - - {{ end }} + {{ if $toc }} + + {{ end }} - {{ template "breadcrumb" dict "page" . "value" .Title }} + {{if ne .Site.Params.disableBreadcrumb true}} + {{ template "breadcrumb" dict "page" . "value" .Title }} + {{ else }} + {{ .Title }} + {{ end }} {{ if $toc }} From 6d6fde35b9530f0692751faf72e81fd648f141c4 Mon Sep 17 00:00:00 2001 From: will wade Date: Wed, 14 Mar 2018 00:30:00 +0000 Subject: [PATCH 2/3] adding .Site.Params.disableNextPrev adding this site param to disable back and forth.. --- layouts/partials/footer.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 4fd380dcf0..06b2d331ec 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -39,13 +39,14 @@ {{ end }} {{ end }} - + {{if ne .Site.Params.disableNextPrev true }} {{with ($.Scratch.Get "prevPage")}} {{end}} {{with ($.Scratch.Get "nextPage")}} {{end}} + {{end}} From a29add8d5e454ef14db604cff9a8adedece99926 Mon Sep 17 00:00:00 2001 From: willwade Date: Mon, 19 Mar 2018 10:40:10 +0000 Subject: [PATCH 3/3] changes so can now use page params as well as site --- layouts/partials/footer.html | 18 ++++++++++-------- layouts/partials/header.html | 3 ++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 06b2d331ec..920c2718aa 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -39,14 +39,16 @@ {{ end }} {{ end }} - {{if ne .Site.Params.disableNextPrev true }} - {{with ($.Scratch.Get "prevPage")}} - - {{end}} - {{with ($.Scratch.Get "nextPage")}} - - {{end}} - {{end}} + + {{$showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev))}} + {{if $showPrevNext}} + {{with ($.Scratch.Get "prevPage")}} + + {{end}} + {{with ($.Scratch.Get "nextPage")}} + + {{end}} + {{end}} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 503e196d1a..a49852014a 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -66,7 +66,8 @@ {{ end }} - {{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 }}