mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
1.3 KiB
1.3 KiB
title | linktitle | description | date | publishdate | lastmod | categories | keywords | draft | menu | weight | sections_weight | aliases | toc | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Menu Variables | Menu Variables | A menu entry in a menu template has specific variables and functions to make menu management easier. | 2017-03-12 | 2017-03-12 | 2017-03-12 |
|
|
false |
|
50 | 50 |
|
false |
The menu template has the following properties:
- .URL
- string
- .Name
- string
- .Title
- string
This is a link title, meant to be used in title
-Attributes of the menu's <a>
-tags.
By default it returns .Page.LinkTitle
, as long as the menu entry was created
through the page's front matter and not through the site config.
Setting it explicitly in the site config or the page's front matter overrides this behaviour.
- .Page
- Page Object
The .Page
variable holds a reference to the page.
It's only set when the menu entry is created from the page's front matter,
not when it's created from the site config.
- .Menu
- string
- .Identifier
- string
- .Pre
- template.HTML
- .Post
- template.HTML
- .Weight
- int
- .Parent
- string
- .Children
- Menu