Skip to content

Menus for Developers

Lukas Gerbenis edited this page Dec 7, 2015 · 1 revision

The following information will help you enhance menus functionality in Better CMS.

How to Add Additional Data to Menu Node

Let's say you are implementing some gorgeous MegaMenu for your awesome website and you need some additional date to be added to menu node. For example: some CSS class for a different menu item styling.

In the CMS configuration file cms.config, set enableMacros to true:

<cms ... enableMacros="true">
   ...
</cms>

During menu node editing (in "Site Settings"), the new field will appear. Here it is possible to input specific data you need for a specific functionality. Every thing you add will be instantly available via API methods (Menu API macro field).

Later, if you do not want to show this field in the menu, just disable it in the configuration file (this configuration option affects only macro field visibility in "Site Settings" menu editing).

Clone this wiki locally