Debian Codegraph @

docs/content/en/methods/menu-entry/Title.md

raw
1 ---
2 title: Title
3 description: Returns the `title` property of the given menu entry.
4 categories: []
5 keywords: []
6 params:
7 functions_and_methods:
8 returnType: string
9 signatures: [MENUENTRY.Title]
10 ---
11
12 The `Title` method returns the `title` property of the given menu entry. If the `title` is not defined, and the menu entry resolves to a page, the `Title` returns the page [`Title`][].
13
14 ```go-html-template
15 <ul>
16 {{ range .Site.Menus.main }}
17 <li><a href="{{ .URL }}" title="{{ .Title }}>{{ .Name }}</a></li>
18 {{ end }}
19 </ul>
20 ```
21
22 [`Title`]: /methods/page/title/