getBlocksByPageUrl
Sayfa URL'sine göre ilişkili bir blok için nesneleri alma.
Açıklama
URL ile ilişkili bir form için PositionBlock nesnelerini alın. Bir dizi IPositionBlock nesnesine çözülmekte olan bir Promise döndürür.
Sayfalar.getBlocksByPageUrl(
url,
langCode
);
Parametreler şeması
Şema
url(gerekli): string
Sayfa URL'si
örnek: "about"
langCode: string
Dil kodu. Varsayılan: "en_US"
örnek: "en_US"
Örnekler
Minimal örnek
const response = await Pages.getFormsByPageUrl('shop');
Özelliklerle örnek
const response = await Pages.getFormsByPageUrl('shop', 'en_US');
Örnek yanıt
[
{
"id": 1,
"attributeSetIdentifier": null,
"localizeInfos": {
"title": "Ürün Bloğu"
},
"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": "bazı metin",
"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": []
}
}
}
]
Yanıt şeması
Şema: IPositionBlock[]
id: number
Nesnenin tanımlayıcısı.
örnek: 1
attributeSetIdentifier: string | null
Özellik seti id'si.
örnek: "block"
localizeInfos: ILocalizeInfo
Yerelleştirmeyi dikkate alarak sayfanın adı.
version: number
Nesnenin sürüm numarası.
örnek: 0
position: number
Nesnenin konumu.
örnek: 1
identifier: string
Kayıt alanı için metinsel tanımlayıcı.
örnek: "product_block"
type: Types
Sayfa türü.
örnek:
"product"
templateIdentifier: string | null
Bağlı şablonun kullanıcı id'si.
örnek: null
isVisible: boolean
Sayfa görünürlüğü belirtisi.
örnek: true
isSync: boolean
Sayfa indeksleme belirtimi.
örnek: false
attributeValues: AttributeType
İndeksten gelen özellik değerleri dizisi (kullanıcı özellik id'si: özellik değeri çifti olarak temsil edilir).
örnek:
{
"block-text": {
"type": "string",
"value": "bazı metin",
"position": 0,
"additionalFields": []
}
}
countElementsPerRow: number
Blokta her satırda görüntülenen eleman sayısı, varsa.
örnek: 3
quantity: number
Bloktaki sayfa sayısı.
örnek: NaN