Skip to main content

searchPage

Quick search for page objects with limited output.

Pages?.searchPage( name?, langCode? );

Minimal example

const value = await Pages.searchPage('cup')
Schema

name(required): string
Text for searching page objects (search is performed on the title field of the localizeInfos object with the language taken into account)
example: "About Us"

langCode: string
Language code. Default: "en_US"
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 response

[
{
"id": 10,
"parentId": null,
"pageUrl": "catalog",
"depth": 0,
"localizeInfos": {
"title": "Catalog",
"menuTitle": "Catalog",
"htmlContent": "",
"plainContent": ""
},
"isVisible": true,
"forms": [],
"blocks": [
"product_block",
"test"
],
"type": "catalog_page",
"templateIdentifier": "template",
"attributeSetIdentifier": "page",
"attributeValues": {
"text": {
"type": "string",
"value": "catalog text",
"position": 0,
"additionalFields": []
},
"number": {
"type": "integer",
"value": 0,
"position": 1,
"additionalFields": []
},
"real": {
"type": "real",
"value": "",
"position": 2,
"additionalFields": []
},
"float": {
"type": "float",
"value": 0,
"position": 3,
"additionalFields": []
}
},
"isSync": true,
"template": {
"id": 4,
"attributeSetIdentifier": null,
"title": "Template",
"generalTypeId": 4,
"identifier": "template",
"version": 0,
"generalTypeName": "catalog_page",
"attributeValues": {},
"position": 1
}
}
]