Skip to main content

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.

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.

NameRequiredTypeDescription
categoriesNoarray of CategoryContains 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.

NameRequiredTypeDescription
titleNostringTiles' category title
tilesYesarray of MenuItemTiles displayed inside the menu for this category
NameRequiredTypeDescription
indexYesnumberIndex used for items' display ordering
textYesstringTitle of the tile. Markdown syntax is usable
textColorNostringText's color
backgroundColorNostringTile's background color
imageNo{ url: string, color?: string }Tile's icon. Color is used to modify the color of SVG files
actionYesActionAction on tile click

Action

NameRequiredTypeDescription
typeYes"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)
valueNoRecord<string, any>Data used depending on the value of the type field

Internal actions

NameAction
openlanguageOpens the language choice view
openhistoryOpens the conversation's history view
opentutorialTriggers the tutorial (does nothing ATM)
opennewsOpens the news view
openweatherOpens the weather view
openemergencyOpens the emergency view (emergency numbers)
fullscreenimageOpens the content of value.url in full page