Ana içeriğe geç

getBlocksByPageUrl

URL ile ilişkili bir blok için nesneleri alma

Pages.getBlocksByPageUrl(url, langCode)

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

url:* string
Sayfa URL'si
örnek: shop

langCode: string
dil kodu
örnek: en_US

URL ile ilişkili bir form için PositionBlock nesnelerini alın. PositionBlock nesnelerinin bir dizisini döndürür.

Örnek dönüş:

[
{
"id": 2,
"localizeInfos": {
"title": "test"
},
"attributeSetIdentifier": "block",
"version": 0,
"position": 2,
"identifier": "test_identifier",
"type": "forTextBlock",
"templateIdentifier": null,
"isVisible": true,
"isSync": false,
"attributeValues": {},
"countElementsPerRow": 0
}
]
Şema

id: number
nesne tanımlayıcısı
örnek: 1764

version number
nesne sürüm numarası
örnek: 10

identifier: string
kayıt alanı için metin tanımlayıcısı
örnek: catalog

attributeSetId: number
özellik seti tanımlayıcısı
örnek: 7

localizeInfos: Record<string, any>
dilin "en_US" dikkate alındığında ana sayfa veri nesnesinin json tanımı (örneğin)
örnek:

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

customSettings: BlockCustomSettings
farklı blok türleri için özel ayarlar
örnek:

{
"sliderDelay": 0,
"sliderDelayType": "",
"productQuantity": 4,
"productSortType": "By_ID",
"productSortOrder": "Descending",
"productCountElementsPerRow": 10,
"similarProductRules": [
{
"property": "Descending",
"includes": "",
"keywords": "",
"strict": ""
}
]
}

isSync: boolean
sayfa dizinleme göstergesi (doğru veya yanlış)
örnek: false

attributeValues: Record<string, string>
indeksten gelen özellik değerleri dizisi (özel özellik tanımlayıcısı: özellik değeri çifti olarak sunulmuştur)
örnek:

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

position: number
sıralama için pozisyon numarası (isteğe bağlı)
örnek: 192

type: string
Sayfa türü
örnek: forNewsPage
Enum: [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ]

templateIdentifier: string
blok tarafından kullanılan şablonun işareti (null olabilir)
örnek: null