getMenusByMarker
Getting pages included in the menu by marker
Menus.getMenusByMarker(marker)
const value = await Menus.getMenusByMarker('my-marker')
Schema
marker:* string
Menu marker
example: my-marker
langCode: string
Language code
example: en_US
This method retrieves a single menu object based on its marker (marker) from the API. It returns a Promise that resolves to a single menu object as a object with included pages.
Example return:
{
"id": 1764,
"identifier": "catalog",
"localizeInfos": {
"title": "Main Menu"
},
"pages": [
{
"id": 11,
"pageUrl": "122",
"localizeInfos": {
"title": "12",
"content": "",
"menuTitle": "12"
},
"position": 0,
"parentId": null
}
]
}
Schema
id: number
object identifier
example: 1764
identifier: string
textual identifier for a record field
example: catalog
localizeInfos Record<string, any>
json object description of the menu item with the language "en_US" (for example)
example:
{
"en_US": {
"title": "Main Menu"
}
}
pages:
data of the pages included in the menu
example:
[
{
"id": 11,
"pageUrl": "122",
"localizeInfos": {
"en_US": {
"title": "12",
"plainContent": "Content for catalog",
"htmlContent": "<b>Content for catalog</b>",
"menuTitle": "12"
}
},
"position": 0,
"parentId": null
}
]