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(zorunlu): 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"
},
"isVisible": true,
"version": 0,
"position": 1,
"identifier": "product_block",
"type": "product_block",
"templateIdentifier": null,
"isSync": false,
"attributeValues": {}
},
{
"id": 4,
"attributeSetIdentifier": "block",
"localizeInfos": {
"title": "test"
},
"isVisible": true,
"version": 8,
"position": 2,
"identifier": "test",
"type": "common_block",
"templateIdentifier": null,
"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
Öznitelik seti id'si.
örnek: "block"
localizeInfos: ILocalizeInfo
Yerelleştirmeyi dikkate alarak sayfanın adı.
örnek:
{
"title": "Blog",
"menuTitle": "Blog",
"htmlContent": "",
"plainContent": ""
}
version: number
Nesnenin sürüm numarası.
örnek: 0
position: number
Nesnenin pozisyonu.
ö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üğü işareti.
örnek: true
isSync: boolean
Sayfanın dizinlenme durumu.
örnek: false
attributeValues: AttributeType
İndeksten gelen öznitelik değerleri dizisi (kullanıcı öznitelik id'si: öznitelik 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: 1