天天看点

SAP Spartacus Breadcrumbs Component的显示问题讨论

如果把Storefront.component.html里position为BottomHeaderSlot改成其他名称:

SAP Spartacus Breadcrumbs Component的显示问题讨论

按照其注释写到:

position是用于为指定的page slot定位CMS Component而设计的。

The position is used to find the CMS components for the page slot.

因此,改动之后,Breadcrumbs Component从最后渲染出的页面上消失了:

SAP Spartacus Breadcrumbs Component的显示问题讨论
SAP Spartacus Breadcrumbs Component的显示问题讨论

从下图Commerce Cloud Restful API返回的response能看出,我们在Spartacus Storefront.component.html里的position,必须硬编码为BottomHeaderSlot,只有这样才能和OCC API返回的CMS Component元数据一致:

SAP Spartacus Breadcrumbs Component的显示问题讨论

继续阅读