mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-14 13:33:09 +00:00
19 lines
569 B
HTML
19 lines
569 B
HTML
<!--
|
|
Displays a breadcrum for a specific page. The shortcode supports the following arguments:
|
|
"path" Optional path of the page, defaults to current page.
|
|
-->
|
|
|
|
{{- $error := false -}}
|
|
{{- $page := . -}}
|
|
{{- $path := .Get "path" | default "" }}
|
|
{{- if $path -}}
|
|
{{- $page = .Site.GetPage $path -}}
|
|
{{- if not $page -}}
|
|
{{- errorf "Invalid or missing value for param 'path': %s" .Position -}}
|
|
{{- $error = true -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- if not $error -}}
|
|
{{- partial "assets/breadcrumb.html" $page -}}
|
|
{{- end -}} |