hasmenucurrent.md (831B)
1 ---
2 title: .HasMenuCurrent
3 description:
4 date: 2017-02-01
5 publishdate: 2017-02-01
6 lastmod: 2017-02-01
7 categories: [functions]
8 menu:
9 docs:
10 parent: "functions"
11 keywords: [menus]
12 signature: ["PAGE.HasMenuCurrent MENU MENUENTRY"]
13 workson: [menus]
14 hugoversion:
15 relatedfuncs: ["IsMenuCurrent"]
16 deprecated: false
17 toc: false
18 draft: false
19 aliases: []
20 ---
21
22 `.HasMenuCurrent` is a method in `Page` object returning a _boolean_ value. It
23 returns `true` if the PAGE is the same object as the `.Page` in one of the
24 **children menu entries** under MENUENTRY in a given MENU.
25
26 {{< new-in "0.86.0" >}} If MENUENTRY's `.Page` is a [section](/content-management/sections/) then, from Hugo `0.86.0`, this method also returns true for any descendant of that section..
27
28 You can find its example use in [menu templates](/templates/menu-templates/).