Menu

Use the menu helper to render menus.

Arguments

Parameters

info

Use depth=0 to get all the descendants of a folder; the listing will use the default maximum folder depth for traversal which is 64.

Local Variables

Example

Render a named menu:

{{menu "docs"}}

Render a menu of pages in the current folder excluding the index page:

{{menu list=true}}

Render a menu of pages in the current folder and include the index page:

{{menu list=true include-index=true}}

Render a menu including all the descendants of the current folder upto the the maximum depth:

{{menu list=true depth=0}}

Iterate the pages in a menu and exclude the current page:

{{#menu "docs"}}
{{#unless @self}}{{title}}{{/unless}}
{{/menu}}

Iterate the pages in the current folder (list=true is inferred):

{{#menu}}
{{#unless @self}}{{title}}{{/unless}}
{{/menu}}

Iterate all the pages in a specific folder upto the maximum folder depth:

{{#menu path="/docs/" list=true include-index=true depth=0}}
{{title}}
{{/menu}}

Back to Helpers