Added ability to have optional alternative menu item name that is different from title also displayed on modal page

This commit is contained in:
rac2030 2017-03-02 00:28:28 +01:00
parent 5ebb44c104
commit 721c3379f6
2 changed files with 2 additions and 1 deletions

View file

@ -1,6 +1,7 @@
+++ +++
title = "Formspree" title = "Formspree"
weight = 60 weight = 60
menuname = "Contact 2"
draft = true draft = true
+++ +++

View file

@ -17,7 +17,7 @@
<nav> <nav>
<ul> <ul>
{{ range .Data.Pages.ByWeight }} {{ range .Data.Pages.ByWeight }}
<li><a href="#{{ .File.BaseFileName }}">{{ .Title }}</a></li> <li><a href="#{{ .File.BaseFileName }}">{{ if .GetParam "menuname" }}{{ .GetParam "menuname" }}{{ else }}{{ .Title }}{{ end }}</a></li>
{{ end }} {{ end }}
</ul> </ul>
</nav> </nav>