summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authormms <michal@sapka.me>2024-05-04 22:31:20 +0200
committermms <michal@sapka.me>2024-05-04 22:31:20 +0200
commit1d09e76216487795c8f48858527a22ce32f30386 (patch)
tree0f2b26ed1687e06d9ad45f1108ba586a5cdb0075 /layouts
parent126f1384861265a5548e5c4540a786ee4f6002d3 (diff)
feat: add nav to stv
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/menu.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html
index 15da3f9..f70ac28 100644
--- a/layouts/partials/menu.html
+++ b/layouts/partials/menu.html
@@ -20,7 +20,15 @@
{{- define "partials/inline/menu/inline.html" }}
{{- $page := .page }}
{{- range .menuEntries }}
- <a href="{{ .URL }}"> {{ .Name }}</a>{{- partial "menu/new-or-up.html" (dict "page" ($page.GetPage .URL)) }}
+ {{- $pageItem := $page.GetPage .URL}}
+ {{- if $pageItem.Params.menu_item_override }}
+ <a href="{{ .URL }}">{{ $pageItem.Params.menu_item_override }}</a>
+ {{- else}}
+ <a href="{{ .URL }}"> {{ .Name }}</a>
+ {{- end }}
+
+ {{- partial "menu/new-or-up.html" (dict "page" ($pageItem)) }}
+
{{- end }}
{{- end }}