Rename title overwrite properties to header_menu_title and navigation_menu_title

This commit is contained in:
Jesper Kolbeck 2022-02-06 18:15:49 +01:00
parent 74bdc30f2b
commit a28a76767a
3 changed files with 11 additions and 6 deletions

View file

@ -1,9 +1,13 @@
--- ---
title: '{{ replace .Name "-" " " | title }}' title: '{{ replace .Name "-" " " | title }}'
# The "name" value will be used as text for buttons and fixed menu items. # The "header_menu_title" value will be used as text for header buttons.
# The "title" value will be used if value for "name" is not provided. # The "title" value will be used if value for "header_menu_title" is not provided.
#name: 'Short Title' #header_menu_title: 'Short Menu Title'
# The "navigation_menu_title" value will be used as text for fixed menu items.
# The "title" value will be used if value for "navigation_menu_title" is not provided.
#navigation_menu_title: 'Short Menu Title'
# The "weight" will determine where this section appears on the "homepage". # The "weight" will determine where this section appears on the "homepage".
# A bigger weight will place the content more towards the bottom of the page. # A bigger weight will place the content more towards the bottom of the page.

View file

@ -1,6 +1,7 @@
--- ---
title: "The Services I Offer" title: "The Services I Offer"
name: "My Services" header_menu_title: "My Services"
navigation_menu_title: "Services"
weight: 2 weight: 2
header_menu: true header_menu: true
--- ---

View file

@ -11,7 +11,7 @@
{{ range where $sections ".Params.header_menu" "eq" true }} {{ range where $sections ".Params.header_menu" "eq" true }}
{{ $button_title := .Title }} {{ $button_title := .Title }}
{{ with .Params.Name }} {{ with .Params.header_menu_title }}
{{ $button_title = . }} {{ $button_title = . }}
{{ end }} {{ end }}
<a class='btn site-menu' data-title-anchor='{{ anchorize .Title }}'>{{ $button_title }}</a> <a class='btn site-menu' data-title-anchor='{{ anchorize .Title }}'>{{ $button_title }}</a>
@ -26,7 +26,7 @@
</div> </div>
{{ range $index_val, $elem_val := $sections }} {{ range $index_val, $elem_val := $sections }}
{{ $fnav_title := .Title }} {{ $fnav_title := .Title }}
{{ with .Params.Name }} {{ with .Params.navigation_menu_title }}
{{ $fnav_title = . }} {{ $fnav_title = . }}
{{ end }} {{ end }}
<div class='post-holder'> <div class='post-holder'>