Exporting and importing the menu structure

The menu structure is key to deployment of applications either to end users or to other developers.

The SmartFramework has specific export and import routines for menu structures. Those routines export and import both the SmartMenu and SmartFunction records required for a certain menu structure.

Exporting menu structure

The procedure Consultingwerk/SmartFramework/Tools/Export/MenuStructure/export-menu-structure.p provides an example on how to use the MenuStructureExporter class to export the menu structure based on a given root MenuGuid to an XML file.

The easiest way to find out about the MenuGuid is the function in the contextual ribbon of the Menu Function Maintenance. This allows you to copy the MenuGuid of the currently selected menu item to the Windows clipboard so that you can copy it into your source code.

We recommend that customers create their own procedures based on the interactive export-menu-structure.p that contain fixed values for the cParentGuids variable for simpler reuse.

Importing menu structure

The procedure Consultingwerk/SmartFramework/Tools/Import/MenuStructure/import-menu-structure.p provides an example on how to use the MenuStructureImporter importer class to import the menu structure from a given file.

We recommend that customers create their own procedures based on this sample that contains fixed values for the import file name.