getChildPagesByParentUrl
Ana sayfa URL'sine göre ürün bilgileriyle alt sayfaları bir dizi olarak alma.
Açıklama
Seçilen ana sayfa için oluşturulan tüm sayfaları bir nesne dizisi veya boş bir dizi [] (veri yoksa) olarak döner. IPagesEntity nesnelerinden oluşan bir diziye çözülmekte olan bir Promise döner.
Sayfalar.getChildPagesByParentUrl(
url*,
langCode
);
Parametreler şeması
Şema
url(gerekli): string
Alt sayfaların alınacağı ana sayfanın URL'si
örnek: "about/our-team"
langCode: string
Dil kodu. Varsayılan: "en_US"
örnek: "en_US"
Örnekler
Minimal örnek
const response = await Pages.getChildPagesByParentUrl('shop');
Özelliklerle örnek
const response = await Pages.getChildPagesByParentUrl('shop', 'en_US');
Örnek yanıt
[
{
"id": 9,
"config": {},
"depth": 1,
"parentId": 8,
"pageUrl": "blog1",
"attributeSetIdentifier": null,
"total": "1",
"localizeInfos": {
"title": "Blog 1",
"menuTitle": "Blog 1",
"htmlContent": "",
"plainContent": ""
},
"isVisible": true,
"products": 0,
"childrenCount": "0",
"type": "common_page",
"position": 1,
"templateIdentifier": null,
"isSync": false,
"categoryPath": "blog/blog1",
"attributeValues": {}
}
]
Yanıt şeması
Şema: IPagesEntity
id: number
Nesnenin tanımlayıcısı.
örnek: 8
parentId: number | null
Ana 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
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
Öznitelik seti id'si.
örnek: "page"
attributeValues: AttributeType
İndeksten öznitelik değerleri dizisi (kullanıcı öznitelik id'si: öznitelik değeri çifti olarak temsil edilir).
örnek:
{
"text": {
"type": "string",
"value": "some text",
"position": 0,
"additionalFields": []
}
}
isSync: boolean
Sayfa indeksleme belirtisi.
örnek: true
template: any
Şablon nesnesi.
örnek:
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
blocks: any
bloklar.
örnek:
{
"id": 4,
"attributeSetIdentifier": null,
"title": "Template",
"generalTypeId": 4,
"identifier": "template",
"version": 0,
"generalTypeName": "catalog_page",
"attributeValues": {},
"position": 1
}