searchPage
Quick search for page objects with limited output
Pages.searchPage(name, langCode)
const value = await Pages.searchPage('cup')
Schema
name:* string
Text for searching page objects (search is performed on the title field of the localizeInfos object with the language taken into account)
example: cup
langCode: string
lang code
example: en_US
This method performs a quick search for page objects based on a text query (name). It returns a Promise that resolves to a objects or an empty array [].
Example return:
[
{
"id": 2,
"parentId": null,
"pageUrl": "catalog",
"depth": 0,
"localizeInfos": {
"title": "Catalog",
"menuTitle": "Catalog",
"htmlContent": "",
"plainContent": ""
},
"isVisible": true,
"forms": [],
"blocks": [
"test",
"product_block"
],
"type": "forCatalogPages",
"templateIdentifier": "template",
"attributeValues": {
"text": {
"type": "string",
"value": "catalog text",
"position": 0
}
},
"products": 3,
"isSync": true
}
]