Ana içeriğe geç

getPages

Ürün bilgileri ile tüm sayfa nesnelerini bir dizi olarak alma.

Açıklama

Bu yöntem, API'den oluşturulmuş tüm sayfaları bir dizi olarak alır. IPagesEntity nesnelerinin bir dizisine çözülmekte olan 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": 10,
"config": {},
"depth": 0,
"parentId": null,
"pageUrl": "catalog",
"attributeSetIdentifier": "page",
"localizeInfos": {
"title": "Katalog",
"menuTitle": "Katalog",
"htmlContent": "",
"plainContent": ""
},
"isVisible": true,
"products": 3,
"childrenCount": 0,
"type": "catalog_page",
"position": 5,
"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
}
},
{
"id": 8,
"config": {},
"depth": 0,
"parentId": null,
"pageUrl": "blog",
"attributeSetIdentifier": "page",
"localizeInfos": {
"title": "Blog",
"menuTitle": "Blog",
"htmlContent": "",
"plainContent": ""
},
"isVisible": true,
"products": 0,
"childrenCount": 1,
"type": "common_page",
"position": 3,
"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": 9,
"config": {},
"depth": 1,
"parentId": 8,
"pageUrl": "blog1",
"attributeSetIdentifier": null,
"localizeInfos": {},
"isVisible": true,
"products": 0,
"childrenCount": 0,
"type": "common_page",
"position": 1,
"templateIdentifier": null,
"isSync": false,
"attributeValues": {}
}
]

Yanıt şeması

Şema: IPagesEntity[]

id: number
Nesnenin tanımlayıcısı.
örnek: 8

parentId: number | null
Eğer null içeriyorsa, üst düzey sayfanın id'si.
örnek: 10

pageUrl: string
Benzersiz sayfa URL'si.
örnek: "blog"

depth: number
parentId'ye 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üğü belirtisi.
ö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
İndeksin özellik değerleri dizisi (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 belirtisi.
örnek: true

template: any
Şablon nesnesi.

position: number
Öğe numarası (sıralama için).
ö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