getChildPagesByParentUrl
Ana sayfa URL'sine göre ürün bilgileri ile alt sayfaları bir dizi olarak alma.
Açıklama
Seçilen ana sayfa için oluşturulan tüm sayfaları bir nesne dizisi veya veri yoksa boş bir dizi [] olarak döndürür. Bir dizi IPagesEntity nesnesine çözülen bir Promise döndürür.
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
Sayfanın adı, yerelleştirme dikkate alınarak.
ö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
Ö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 durumu.
örnek: true
template: any
Şablon nesnesi.
örnek:
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
blocks: any
bloklar.
örnek:
{
"id": 4,
"attributeSetIdentifier": null,
"title": "Şablon",
"generalTypeId": 4,
"identifier": "template",
"version": 0,
"generalTypeName": "catalog_page",
"attributeValues": {},
"position": 1
}