diff options
author | Paul <paul@brainspark.nl> | 2020-02-29 10:36:08 +0300 |
---|---|---|
committer | Paul <paul@brainspark.nl> | 2020-02-29 10:36:08 +0300 |
commit | 162bb9dfeb1f914fb975917ff0d572a0de26c908 (patch) | |
tree | e17c6b0e5b270d9d17b78e341d1d13262021a20c | |
parent | db979b35a4a99e3a56af7b0307036edf34921e60 (diff) |
Move from .URL to .RelPermalink
-rw-r--r-- | layouts/partials/breadcrumbs.html | 12 | ||||
-rw-r--r-- | layouts/partials/breadcrumbs/recursive.html | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html index 4a8d4b8..a811e88 100644 --- a/layouts/partials/breadcrumbs.html +++ b/layouts/partials/breadcrumbs.html @@ -6,7 +6,7 @@ {{- $full_data := "" }} {{- with $ctx }} - {{- $path := split .URL "/" }} + {{- $path := split .RelPermalink "/" }} {{- $data := partial $header . }} {{- $full_data = printf "%s%s" $full_data $data }} @@ -21,25 +21,25 @@ {{/* Find the taxonomyTerm and render */}} {{- $taxonomyTerm := .Site.GetPage "taxonomyTerm" .Data.Plural }} - {{- $data := partial $item (dict "caption" $taxonomyTerm.Title "url" $taxonomyTerm.URL "level" 1 "image" "" "final" false) }} + {{- $data := partial $item (dict "caption" $taxonomyTerm.Title "url" $taxonomyTerm.RelPermalink "level" 1 "image" "" "final" false) }} {{- $full_data = printf "%s%s" $full_data $data }} {{/* Render the taxonomy item */}} - {{- $data := partial $item (dict "caption" .Title "url" .URL "level" 2 "image" "" "final" true) }} + {{- $data := partial $item (dict "caption" .Title "url" .RelPermalink "level" 2 "image" "" "final" true) }} {{- $full_data = printf "%s%s" $full_data $data }} {{- else if or ( eq .Kind "section" ) ( eq .Kind "page" ) }} {{/* Display all relevant section elements */}} - {{- $data := partial "breadcrumbs/recursive.html" (dict "output_type" $output_type "sections" .Site.Home.Sections "level" 1 "path" $path "dir" .URL ) }} + {{- $data := partial "breadcrumbs/recursive.html" (dict "output_type" $output_type "sections" .Site.Home.Sections "level" 1 "path" $path "dir" .RelPermalink ) }} {{- $full_data = printf "%s%s" $full_data $data }} {{- if eq .Kind "page" }} - {{- $aux := split .URL "/" }} - {{- $data := partial $item (dict "caption" .Title "url" .URL "level" (sub (len $aux) 2 ) "image" .Params.share_img "final" true ) }} + {{- $aux := split .RelPermalink "/" }} + {{- $data := partial $item (dict "caption" .Title "url" .RelPermalink "level" (sub (len $aux) 2 ) "image" .Params.share_img "final" true ) }} {{- $full_data = printf "%s%s" $full_data $data }} {{- end }} diff --git a/layouts/partials/breadcrumbs/recursive.html b/layouts/partials/breadcrumbs/recursive.html index 0994e9b..3a9c59b 100644 --- a/layouts/partials/breadcrumbs/recursive.html +++ b/layouts/partials/breadcrumbs/recursive.html @@ -8,10 +8,10 @@ {{- range $sections }} {{- $section := index $path $level }} - {{- $aux := split .URL "/" }} + {{- $aux := split .RelPermalink "/" }} {{- if eq $section (index $aux $level) }} - {{ $data := partial $item (dict "caption" .Title "url" .URL "image" .Params.share_img "level" $level "final" (eq ( add $level 2 ) (len $path) ) ) }} + {{ $data := partial $item (dict "caption" .Title "url" .RelPermalink "image" .Params.share_img "level" $level "final" (eq ( add $level 2 ) (len $path) ) ) }} {{ $full_data = printf "%s%s" $full_data $data }} {{- if gt (len .Sections) 0 }} |