getPages
Tüm sayfa nesnelerini ürün bilgileri ile birlikte bir dizi olarak alma.
Açıklama
Bu yöntem, API'den oluşturulmuş tüm sayfaları bir dizi olarak alır. Veri yoksa, bir dizi nesne veya boş bir dizi [] döndüren bir Promise döner.
Pages.getPages(
langCode
);
Parametreler şeması
Şema
langCode: string
Dil kodu. Varsayılan: "en_US"
örnek: "en_US"
Örnekler
Minimal örnek
const response = await Pages.getPages();
Özelliklerle örnek
const response = await Pages.getPages('en_US');
Örnek yanıt
[
{
"id": 9,
"config": {},
"depth": 1,
"parentId": 8,
"pageUrl": "blog1",
"attributeSetIdentifier": null,
"localizeInfos": {
"title": "Blog 1",
"menuTitle": "Blog 1",
"htmlContent": "",
"plainContent": ""
},
"position": 1,
"isVisible": true,
"products": 0,
"childrenCount": 0,
"type": "common_page",
"templateIdentifier": null,
"isSync": false,
"attributeValues": {}
},
{
"id": 8,
"config": {},
"depth": 0,
"parentId": null,
"pageUrl": "blog",
"attributeSetIdentifier": "page",
"localizeInfos": {
"title": "Blog",
"menuTitle": "Blog",
"htmlContent": "",
"plainContent": ""
},
"position": 2,
"isVisible": true,
"products": 0,
"childrenCount": 1,
"type": "common_page",
"templateIdentifier": "template",
"isSync": true,
"attributeValues": {
"text": {
"type": "string",
"value": "bazı metin",
"position": 0,
"additionalFields": []
},
"number": {
"type": "integer",
"value": 0,
"position": 1,
"additionalFields": []
},
"real": {
"type": "real",
"value": "",
"position": 2,
"additionalFields": []
},
"float": {
"type": "float",
"value": 0,
"position": 3,
"additionalFields": []
}
},
"template": {
"id": 4,
"attributeSetIdentifier": null,
"title": "Şablon",
"generalTypeId": 4,
"identifier": "template",
"version": 0,
"generalTypeName": "catalog_page",
"attributeValues": {},
"position": 1
}
},
{
"id": 10,
"config": {},
"depth": 0,
"parentId": null,
"pageUrl": "catalog",
"attributeSetIdentifier": "page",
"localizeInfos": {
"title": "Katalog",
"menuTitle": "Katalog",
"htmlContent": "",
"plainContent": ""
},
"position": 3,
"isVisible": true,
"products": 3,
"childrenCount": 0,
"type": "catalog_page",
"templateIdentifier": "template",
"isSync": true,
"attributeValues": {
"text": {
"type": "string",
"value": "katalog metni",
"position": 0,
"additionalFields": []
},
"number": {
"type": "integer",
"value": 0,
"position": 1,
"additionalFields": []
},
"real": {
"type": "real",
"value": "",
"position": 2,
"additionalFields": []
},
"float": {
"type": "float",
"value": 0,
"position": 3,
"additionalFields": []
}
},
"template": {
"id": 4,
"attributeSetIdentifier": null,
"title": "Şablon",
"generalTypeId": 4,
"identifier": "template",
"version": 0,
"generalTypeName": "catalog_page",
"attributeValues": {},
"position": 1
}
}
]
Yanıt şeması
Şema: IPagesEntity[]
id: number
Nesnenin tanımlayıcısı.
örnek: 8
parentId: number | null
Ebeveyn sayfanın id'si, eğer null içeriyorsa, o zaman üst düzey sayfadır.
örnek: 10
pageUrl: string
Benzersiz sayfa URL'si.
örnek: "blog"
depth: number
Ebeveyn id'sine göre sayfa iç içe geçme derinliği.
örnek: 10
localizeInfos: ILocalizeInfo
Yerelleştirmeyi dikkate alarak sayfanın adı.
örnek:
{
"title": "Blog",
"menuTitle": "Blog",
"htmlContent": "",
"plainContent": ""
}
isVisible: boolean
Sayfa görünürlüğü işareti.
örnek: true
type: Types
Sayfa türü.
örnek:
"common_page"
templateIdentifier: string | null
Bağlı şablonun kullanıcı id'si.
örnek: "template"
attributeSetIdentifier: string | null
Özellikler kümesi id'si.
örnek: "page"
attributeValues: AttributeType
Dizideki özellik değerleri (kullanıcı özellik id'si: özellik değeri çifti olarak temsil edilir).
örnek:
{
"text": {
"type": "string",
"value": "bazı metin",
"position": 0,
"additionalFields": []
}
}
isSync: boolean
Sayfa dizinleme durumu.
örnek: true
template: any
Şablon nesnesi.
position: number
Sıralama için öğe numarası.
örnek: 2
config: any
Katalog sayfaları için çıktı ayarları.
örnek:
{
"rowsPerPage": 1,
"productsPerRow": 1
}
products: number
Sayfaya bağlı ürün sayısı.
örnek: 0
childrenCount: number
Çocuk sayısı.
örnek: 1