Menus
Menus provide navigation paths within mashups. To implement a menu within a mashup, you need to create and define the menu, and then add it to a mashup.
Creating a Menu
1. From Composer, browse Visualization > Menus, and then click the New button .
2. Enter a name, display name, and description for the new menu.
3. Optionally, you can add projects and tags, and then click Save.
Defining a Menu
In the Menu Definition area of the newly created menu, do the following:
1. Optionally, select an icon to represent the menu item, and then associate appropriate user groups to the menu.
2. For each item in the menu, click the Add button, and enter the following information:
New Menu Item
Options
Description
Type
Mashup — Opens a mashup when clicked
Menu — Opens another menu when clicked. This option enables the creation of multi-level structures.
Hyperlink — Opens a hyperlink when clicked.
Logout
Title
Title of the menu item. Menus must have unique titles. Duplicate menu titles will cause permissions to get merged.
Link
Links to a mashup or hyperlink.
Target
Controls whether the page specified in the Link field is opened in a new page or within the current page.
When the selected type is Menu, enter the name of the sub-menu to open this field.
Icon
Image that is displayed with the title text.
Groups
Groups that belong to the menu item.
Default
Defines which menu item is selected by default.
3. Click to save your changes.
Adding a Menu to a Mashup
* 
The Menu widget is not a responsive widget. As a result, a panel is required when inserting this widget into a responsive mashup.
To add your configured menu to a mashup, drag and drop a menu widget onto your mashup, and select the desired menu from the Menu field in the widget properties panel. Also, ensure that the ConfiguredOrData parameter is set to Configured in the widget properties. The Levels parameter can be used to split a structured menu over two sections of the mashup.
Adding Permissions to Menus
In ThingWorx 8.3 and 8.4, permissions can be added to system object menus and extension menus by following the example below. In this example, the menu is named testMenu.
1. Use the UpdateGroups service on the menu to add permissions and group references.
2. Make a POST request with content-type and accept headers set to application/json. The body must be arrays:
https://localhost/Thingworx/Menus/testMenu/Services/UpdateGroups
{
"groupReferences": {
"groupReferences": [
{
"name": "Developers",
"type": "Groups"
}
]
},
"menuItems": {
"menuItems": [
{
"groupReferences": [
{
"name": "Developers",
"type": "Groups"
}
]
}
]
}
}
3. If you have more than one menu item, you must set it for every row by repeating the nested groupReferences under menuItems.
* 
The order of the menu items must be considered when setting permissions. Verify the order before setting the permissions.
{
"groupReferences": {
"groupReferences": [
{
"name": "Developers",
"type": "Group"
}
]
},
"menuItems": {
"menuItems": [
{
"groupReferences": [
{
"name": "Developers",
"type": "Group"
}
]
}
]
}
}
Menus Imported with Extensions
By default, if a menu is imported with an extension object, the Group Associations property on menus and the Groups property on menu items are editable.
* 
If you import an updated version of the extension that contains the menu, changes made in Composer will be merged with any changes made in the extension, outside of Composer.
Was this helpful?