There are multiple ways to create menus in CNS Menu. Menus can be created using any of the methods below and then modified using other methods, so you are not limited to only using one method to create or modify menus.
Using the plug-in’s built-in MenuBuilder editor, you can create menus using a graphical interface. This is the easiest method to create menus, but only allows you to create static menus (although they can be dynamically changed with scripting later). To access the MenuBuilder in FileMaker, go to the Edit menu (on Windows) or the FileMaker menu (on Mac), Preferences, Plug-ins tab, double-click CNS Menu, and select the MenuBuilder tab.
A quick menu is a return-separated list of items where each line represents one item on the menu. Special “meta tags” can be used to specify different styles and marks for the menu items. This is the easiest method to programmatically create menus in FileMaker scripting. Defining a Quick Menu can be done using either the CNSMenu_DefineQuickMenu function or the CNSMenu Define Quick Menu script step (FileMaker 16 or higher only).
XML or JSON
Using XML or JSON gives you the most granular control over your menus. This is the most advanced way to create menus, but it does require knowledge of XML or JSON. To define a menu using XML, use the CNSMenu_DefineXMLMenu function or the CNSMenu Define XML Menu script step. To define a menu using JSON, use the CNSMenu_DefineJSONMenu script step or the CNSMenu Define JSON Menu script step.
Alternatively, you can create a menu by giving the plug-in a file from your hard drive that contains the XML or JSON text. This is done with the CNSMenu_DefineFileMenu function or the CNSMenu Define File Menu script step.