> ## Content Index
> Fetch the complete content index at: https://getpublii.com/dev/llms.txt
> Use this file to discover other available public pages before exploring further.

# menu.hbs partial

- URL: https://getpublii.com/dev/menuhbs-partial/
- Published: 2020-03-22T20:14:19.406Z
- Updated: 2024-02-09T09:41:18.792Z
- Description: The menu partial is used for rendering menus at your website. This partial should get a param with a structure of the menu to render:…
- Author: Bob Mitro
- Tags: Menu, Partials

The menu partial is used for rendering menus at your website.
This partial should get a param with a structure of the menu to render:

```handlebars
{{> menu menus.mainMenu}}
```

Above code will render the main menu of the website.

You have not include partials/menu.hbs in your theme. In this case Publii will load the following default menu.hbs file:

```handlebars
{{#unless level}}
<nav>
{{/unless}}
    <ul{{#if level}} class="submenu submenu-level-{{level}}"{{else}} class="menu menu-level-1"{{/if}}>
        {{#each items}}
            <li{{menuItemClasses}}>
            {{#if link}}
            <a href="{{menuUrl}}"{{#if title}} title="{{title}}"{{/if}}{{#if target}} target="{{target}}"{{/if}}{{#if rel}} rel="{{rel}}"{{/if}}>{{label}}</a>
            {{else}}
            <span{{#if title}} title="{{title}}"{{/if}}>{{label}}</span>
            {{/if}}

            {{#if items}}
                {{> menu}}
            {{/if}}
        </li>
        {{/each}}
    </ul>
{{#unless level}}
</nav>
{{/unless}}
```
