getChildPagesByParentUrl
Getting child pages with product information by parent page url as an array.
Pages?.getChildPagesByParentUrl( url?, langCode? );
Minimal example
const value = await Pages.getChildPagesByParentUrl('shop');
Schema
url(required): string
The URL of the parent page for which child pages are to be fetched
example: "about/our-team"
langCode: string
Language code. Default: "en_US"
example: "en_US"
Getting child pages with information about products in the form of an array. Returns all created pages as an array of objects or an empty array [] (if there is no data) for the selected parent.
Example response
[
{
"id": 9,
"config": {},
"depth": 1,
"parentId": 8,
"pageUrl": "blog1",
"attributeSetIdentifier": null,
"localizeInfos": {
"title": "Blog 1",
"menuTitle": "Blog 1",
"htmlContent": "",
"plainContent": ""
},
"position": 1,
"isVisible": true,
"products": 0,
"childrenCount": 0,
"type": "common_page",
"templateIdentifier": null,
"isSync": false,
"attributeValues": {}
}
]
Schema
id: number
The identifier of the object.
example: 8
parentId: number | null
The id of the parent page, if it contains null, then it is the top-level page.
example: 10
pageUrl: string
Unique page Url.
example: "blog"
depth: number
Page nesting depth relative to parentId.
example: 10
localizeInfos: ILocalizeInfo
The name of the page, taking into account localization.
example:
{
"title": "Blog",
"menuTitle": "Blog",
"htmlContent": "",
"plainContent": ""
}
isVisible: boolean
A sign of page visibility.
example: true
type: Types
Page type.
example:
"common_page"
templateIdentifier: string | null
User id of the linked template.
example: "template"
attributeSetIdentifier: string | null
Set of attributes id.
example: "page"
attributeValues: AttributeType
Array of attribute values from the index (represented as a pair of user attribute id: attribute value).
example:
{
"text": {
"type": "string",
"value": "some text",
"position": 0,
"additionalFields": []
}
}
isSync: boolean
Indication of page indexing.
example: true
template: any
Template object.
position: number
Item number (for sorting).
example: 2
config: any
Output settings for catalog pages.
example:
{
"rowsPerPage": 1,
"productsPerRow": 1
}
products: number
The number of products linked to the page.
example: 0
childrenCount: number
Children count.
example: 1