SAP Spartacus storefront.component.html 怎么关联到其他的页面
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                SAP Spartacus storefront.component.html 怎么关联到其他的页面
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                storefront怎么關聯到其他的頁面?
下圖是storefront.component.html的源代碼,里面使用自定義Component cx-page-layout和cx-page-slot, 將Commerce Cloud后臺content slot里定義的Component渲染出來:
main節點里的cx-page-layout節點是通過ActivatedRoute創建的:
 
section1里第一個節點就是banner:
 
下圖的cx-page-layout, 實際是消費PageLayout,并給其名為section的input,傳入一個字符串值:header
傳入header給PageLayoutComponent:
 
在 layout.config.ts 里定義的這些高亮的字符串,是 slotID:
 每個 section 里到底能放哪些 cms Components,是后臺 Backoffice 決定的,通過 OCC API 返回給 Spartacus:
 
更多Jerry的原創文章,盡在:“汪子熙”:
 
總結
以上是生活随笔為你收集整理的SAP Spartacus storefront.component.html 怎么关联到其他的页面的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 可口的披萨一共几章
- 下一篇: 照顾好自己经典语录 写给自己的暖心语录
