github.com/shohhei1126/hugo@v0.42.2-0.20180623210752-3d5928889ad7/docs/content/en/variables/menus.md (about)

     1  ---
     2  title: Menu Variables
     3  linktitle: Menu Variables
     4  description: A menu entry in a menu template has specific variables and functions to make menu management easier.
     5  date: 2017-03-12
     6  publishdate: 2017-03-12
     7  lastmod: 2017-03-12
     8  categories: [variables and params]
     9  keywords: [menus]
    10  draft: false
    11  menu:
    12    docs:
    13      title: "variables defined by a menu entry"
    14      parent: "variables"
    15      weight: 50
    16  weight: 50
    17  sections_weight: 50
    18  aliases: [/variables/menu/]
    19  toc: false
    20  ---
    21  
    22  The [menu template][] has the following properties:
    23  
    24  .URL
    25  : string
    26  
    27  .Name
    28  : string
    29  
    30  .Title
    31  : string
    32  
    33  This is a link title, meant to be used in `title`-Attributes of the menu's `<a>`-tags.
    34  By default it returns `.Page.LinkTitle`, as long as the menu entry was created
    35  through the page's front matter and not through the site config.
    36  Setting it explicitly in the site config or the page's front matter overrides this behaviour.
    37  
    38  .Page
    39  : [Page Object](/variables/page/)
    40  
    41  The `.Page` variable holds a reference to the page.
    42  It's only set when the menu entry is created from the page's front matter,
    43  not when it's created from the site config.
    44  
    45  
    46  .Menu
    47  : string
    48  
    49  .Identifier
    50  : string
    51  
    52  .Pre
    53  : template.HTML
    54  
    55  .Post
    56  : template.HTML
    57  
    58  .Weight
    59  : int
    60  
    61  .Parent
    62  : string
    63  
    64  .Children
    65  : Menu
    66  
    67  [menu template]: /templates/menu-templates/