Rendering Menus

The menu helper can be used to render a menu; in it's simplest form you can just pass the menu identifier:

{{menu "primary"~}}

Renders to this HTML markup:

<ul><li><a href="../../../../faq/" title="Faq">Faq</a></li>
<li><a href="../../../../contact/" title="Contact">Contact</a></li>
</ul>

The menu helper can also be called using block notation and will set the scope of the inner template to the page for the menu item. In this example we use the page description for the link label:

<ul>
{{~#menu "primary"}}
<li><a href="{{link href}}" title="{{title}}">{{description}}</a></li>
{{/menu~}}
</ul>

Renders to this HTML markup:

<ul>
<li><a href="../../../../faq/" title="Faq">Frequently asked questions</a></li>
<li><a href="../../../../contact/" title="Contact">Get in touch</a></li>
</ul>