Skip to main content

getBlocksByPageUrl

Receiving objects for a related block by page URL.

Pages?.getBlocksByPageUrl( url?, langCode? );

Minimal example

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

url(required): string
Page URL
example: "about"

langCode: string
Language code. Default: "en_US"
example: "en_US"

Get PositionBlock objects for a related form by url. Returns an array of PositionBlock objects.

Example response

[
{
"id": 1,
"attributeSetIdentifier": null,
"localizeInfos": {
"title": "Product Block"
},
"version": 0,
"position": 1,
"identifier": "product_block",
"type": "product_block",
"templateIdentifier": null,
"isVisible": true,
"isSync": false,
"attributeValues": {},
"countElementsPerRow": 1,
"quantity": 1
},
{
"id": 4,
"attributeSetIdentifier": "block",
"localizeInfos": {
"title": "test"
},
"version": 8,
"position": 2,
"identifier": "test",
"type": "common_block",
"templateIdentifier": null,
"isVisible": true,
"isSync": true,
"attributeValues": {
"block-text": {
"type": "string",
"value": "some text",
"position": 0,
"additionalFields": []
},
"interval": {
"type": "timeInterval",
"value": [
{
"values": [
{
"id": "bbc82c9f-1bc4-4c86-b83c-c062016eb7cb",
"dates": [
"2025-04-14T00:00:00.000Z",
"2025-04-14T00:00:00.000Z"
],
"times": [
[
{
"hours": 9,
"minutes": 0
},
{
"hours": 10,
"minutes": 0
}
],
[
{
"hours": 10,
"minutes": 0
},
{
"hours": 11,
"minutes": 0
}
],
[
{
"hours": 11,
"minutes": 0
},
{
"hours": 12,
"minutes": 0
}
],
"..."
],
"intervals": [],
"exceptions": [],
"intervalId": "c6466cd8-c55d-4583-97c5-42b684210f12",
"inEveryWeek": true,
"inEveryMonth": true,
"timeIntervals": [
[
"2025-04-07T09:00:00.000Z",
"2025-04-07T10:00:00.000Z"
],
[
"2025-04-07T10:00:00.000Z",
"2025-04-07T11:00:00.000Z"
],
[
"2025-04-07T11:00:00.000Z",
"2025-04-07T12:00:00.000Z"
],
"..."
]
}
],
"intervalId": "c6466cd8-c55d-4583-97c5-42b684210f12"
}
],
"position": 1,
"additionalFields": []
}
}
}
]
Schema

id: number
The identifier of the object.
example: 1

attributeSetIdentifier: string | null
Set of attributes id.
example: "block"

localizeInfos: ILocalizeInfo
The name of the page, taking into account localization.

version: number
The version number of the object.
example: 0

position: number
The position of the object.
example: 1

identifier: string
The textual identifier for the record field.
example: "product_block"

type: Types
Page type.
example:

"product"

templateIdentifier: string | null
User id of the linked template.
example: null

isVisible: boolean
A sign of page visibility.
example: true

isSync: boolean
Indication of page indexing.
example: false

attributeValues: AttributeType
Array of attribute values from the index (represented as a pair of user attribute id: attribute value).
example:

{
"block-text": {
"type": "string",
"value": "some text",
"position": 0,
"additionalFields": []
}
}

countElementsPerRow: number
Number of elements displayed per row in the block, if applicable.
example: 3

quantity: number
Quantity pages in block.
example: NaN