When working in navigation templates the {{ menu }} variable is actually a HTML Object. This makes it easy to alter the menu class or menu id value before outputting them.

{% set menu.class = menu.class ~ ' myMenuClass' %}

<ul{{ menu.class.attr }}{{ menu.id.attr }}>
</ul>

Available menu attributes

The following attributes are available for you to work with. 

  • class
  • id

See HTML Objects for more information about setting and displaying attribute values.

Other {{ menu }} values are either strings or arrays and should not be manipulated.

This documentation is only for Aptuitiv CMS. Learn more.
Get Started With Aptuitiv