menuConfig (since v2.0.4)
Using
This parameter already existed before v2.0.4, but was used with the old parameters baseMenu, customMenu and subMenu. This version uses only the menu parameter, which contains the categories parameter described thereafter.
Menu
Set up since v2.0.4 and AVAILABLE IN THE CUSTOMIZATION PARAMETERS IN RETORIK STUDIO, the menu parameter allows you to define the elements that will be displayed inside the application's menu.
| Name | Required | Type | Description |
|---|---|---|---|
categories | No | array of Category | Contains the data of the items inside the application's menu |
Category
A category represents a line of items in the menu in desktop / borne modes, and a column with a title and upper / lower separators in mobile mode. This is an object containing a title (facultative) and an array of MenuItem.
| Name | Required | Type | Description |
|---|---|---|---|
title | No | string | Tiles' category title |
tiles | Yes | array of MenuItem | Tiles displayed inside the menu for this category |
MenuItem
| Name | Required | Type | Description |
|---|---|---|---|
index | Yes | number | Index used for items' display ordering |
text | Yes | string | Title of the tile. Markdown syntax is usable |
textColor | No | string | Text's color |
backgroundColor | No | string | Tile's background color |
image | No | { url: string, color?: string } | Tile's icon. Color is used to modify the color of SVG files |
action | Yes | Action | Action on tile click |
Action
| Name | Required | Type | Description |
|---|---|---|---|
type | Yes | "message" | "event" | "url" | "internal" | "message" : sends a message to the bot which text is the value of the item's text field / "event" : sends an event to the bot with the content of value.name and value.value / "url" : opens an external page (QRcode in borne mode) to the content of value.url / "internal" : Retorik Framework internal action (list here) |
value | No | Record<string, any> | Data used depending on the value of the type field |
Internal actions
| Name | Action |
|---|---|
openlanguage | Opens the language choice view |
openhistory | Opens the conversation's history view |
opentutorial | Triggers the tutorial (does nothing ATM) |
opennews | Opens the news view |
openweather | Opens the weather view |
openemergency | Opens the emergency view (emergency numbers) |
fullscreenimage | Opens the content of value.url in full page |