انتقل إلى المحتوى الرئيسي

getBlocksByPageUrl

استلام كائنات لكتلة ذات صلة بواسطة URL

Pages.getBlocksByPageUrl(url, langCode)

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

url:* string
رابط الصفحة
مثال: shop

langCode: string
رمز اللغة
مثال: en_US

احصل على كائنات PositionBlock لطلب ذي صلة بواسطة URL. يعيد مصفوفة من كائنات PositionBlock.

مثال على الإرجاع:

[
{
"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
}
]
Schema

id: number
معرف الكائن
مثال: 1764

version number
رقم إصدار الكائن
مثال: 10

identifier: string
معرف النص لحقل السجل
مثال: catalog

attributeSetId: number
معرف مجموعة السمات
مثال: 7

localizeInfos: Record<string, any>
وصف JSON لكائن بيانات الصفحة الرئيسية مع الأخذ في الاعتبار اللغة "en_US" (على سبيل المثال)
مثال:

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

customSettings: BlockCustomSettings
إعدادات مخصصة لأنواع مختلفة من الكتل
مثال:

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

isSync: boolean
مؤشر فهرسة الصفحة (صحيح أو خطأ)
مثال: false

attributeValues: Record<string, string>
مصفوفة من قيم السمات من الفهرس (مقدمة كزوج من معرف السمة المخصصة: قيمة السمة)
مثال:

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

position: number
رقم الموضع للفرز (اختياري)
مثال: 192

type: string
نوع الصفحة
مثال: forNewsPage
Enum: [ forCatalogProducts, forBasketPage, forErrorPage, forCatalogPages, forProductPreview, forProductPage, forSimilarProductBlock, forStatisticProductBlock, forProductBlock, forForm, forFormField, forNewsPage, forNewsBlock, forNewsPreview, forOneNewsPage, forUsualPage, forTextBlock, forSlider, service ]

templateIdentifier: string
علامة القالب المستخدم بواسطة الكتلة (يمكن أن تكون null)
مثال: null