GitHub Download

menu.hbs partial

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:

{{> 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:

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

            {{#if items}}
                {{> menu}}
{{#unless level}}


Get the latest Publii news, updates and more delivered directly to your email inbox

You can change your mind at any time by clicking the unsubscribe link in the footer of any email you receive from us, or by contacting us at By clicking below, you agree that we may process your information in accordance with our Privacy Policy.