# Menu not rendering items

**URL:** <https://discourse.gohugo.io/t/menu-not-rendering-items/6989>\
**Category:** support\
**Created:** [June 14, 2017, 1:51am UTC](https://discourse.gohugo.io/t/menu-not-rendering-items/6989 "2017-06-14T01:51:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maehue](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@maehue](https://discourse.gohugo.io/u/maehue)\
**Post date:** [June 14, 2017, 1:51am UTC](https://discourse.gohugo.io/t/menu-not-rendering-items/6989/1 "2017-06-14T01:51:12Z")

</div>

I’m having a bit of a time getting the menu to display - so far most problems I have run in to have been my own misunderstanding of how hugo works but this one I think I grasp but still not getting why no menu

I just copy pasted the code from another post - all that I’m getting is an empty \<_ul_\> tag on each page

**config.toml**

```auto
[menu]
  [[menu.main]]
    name = "Home"
    identifier = "home"
    url = "/"
    weight = 10

  [[menu.main]]
    name = "Blog"
    identifier = "blog"
    url = "/blog/"
    weight = 20

  [[menu.main]]
    name = "Contact"
    identifier = "contact-us"
    url = "/contact-us/"
    weight = 30

```

**layouts/\_default/baseof.html**

```auto
<!DOCTYPE html>
<html lang="en">
  <head>
   ...
  </head>
  <body>
    {{block "main" . }}
    {{end}}
    {{block "scripts" . }}
    {{end}}
    {{partial "footer" }}
    {{partial "nav" }}
  </body>
</html>

```

**partials/nav.html**

```auto
{{ $currentNode := . }}
<ul>
{{ range .Site.Menus.main }}
    <li class="{{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }}active{{end}}">
        <a href="{{ .URL }}">{{ .Name }}</a>
        {{ if .HasChildren }}
            <ul class="sub-menu">
                {{ range .Children }}
                    <li class="{{if $currentNode.HasMenuCurrent "main" . }}active{{ end }}">
                        <a href="{{ .URL }}">{{ .Name }}</a>
                    </li>
                {{ end }}
            </ul>
        {{ end }}
    </li>
{{ end }}
</ul>

```

---

<div class="post-metadata">

**Author:** ![budparr](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/budparr/32/749_2.png) [@budparr](https://discourse.gohugo.io/u/budparr)\
**Post date:** [June 14, 2017, 11:43pm UTC](https://discourse.gohugo.io/t/menu-not-rendering-items/6989/2 "2017-06-14T23:43:22Z")

</div>

Try passing the context to the partial. Replace `{{partial "nav" }}` with `{{partial "nav" . }}`

---

<div class="post-metadata">

**Author:** ![maehue](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@maehue](https://discourse.gohugo.io/u/maehue)\
**Post date:** [June 15, 2017, 12:34am UTC](https://discourse.gohugo.io/t/menu-not-rendering-items/6989/3 "2017-06-15T00:34:46Z")

</div>

ah “the dot” got me - that was it thank you.
