Skip to main content

getChildPagesByParentUrl

Getting child pages with product information as an array

Pages.getChildPagesByParentUrl(url, langCode)

const value = await Pages.getChildPagesByParentUrl('shop');
Schema

url:* string
Parent page URL
example: shop

langCode: string
Required parameter lang code
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 return:

[
{
"id": 3,
"config": {},
"depth": 1,
"parentId": 1,
"pageUrl": "blog1",
"attributeSetIdentifier": null,
"localizeInfos": {
"title": "Blog 1",
"menuTitle": "Blog 1",
"htmlContent": "",
"plainContent": ""
},
"position": 1,
"isVisible": true,
"products": 0,
"childrenCount": 0,
"type": "forUsualPage",
"templateIdentifier": null,
"isSync": false,
"attributeValues": {}
}
]
Schema

id: number
object identifier
example: 1764

parentId number
parent page identifier, if null, it is a top-level page
example: null

config Record<string, number>
output settings for catalog pages
example:

{
"rowsPerPage": 1,
"productsPerRow": 1
}

pageUrl string
unique page URL

depth number
page nesting depth relative to parentId
example: 3

localizeInfos: Record<string, any>
json description of the main page data object taking into account the language "en_US" (for example)
example:

{
"en_US": {
"title": "Catalog",
"plainContent": "Content for catalog",
"htmlContent": "<b>Content for catalog</b>",
"menuTitle": "Catalog"
}
}

isVisible: boolean
Page visibility flag
example: true

products number
Number of products linked to the page
example: 0

attributeSetId: number
attribute set identifier
example: 7

forms
Array of FormEntity object identifier values linked to the page (optional)

blocks
Array of BlockEntity object identifier values linked to the page (optional)

isSync: boolean
indicator of page indexing (true or false)
example: false

templateIdentifier: string
Custom identifier of the linked template
example: my-template

attributeValues: Record<string, string>
Array of attribute values from the index (presented as a pair of custom attribute identifier: attribute value)
example:

{
"en_US": {
"marker": {
"value": "",
"type": "string"
}
}
}

position: number
position number for sorting (optional)
example: 192

type: string
Page type
example: forNewsPage
Enum: [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ]

childrenCount: number
number of nested pages
example: 0