如何自定义SAP Spartacus的路由路径
生活随笔
收集整理的這篇文章主要介紹了
如何自定义SAP Spartacus的路由路径
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
地址:https://stackoverflow.com/questions/65830446/customise-spartacus-cart-path
以chart為例:
By default it’s /cart, but what if I want to change it to (for example) /checkout/cart?
解決方案
In defaultStorefrontRoutesConfig we have cart: { paths: [‘cart’] },. You can replace it to anything.
但是要注意,CMS里content page的label也要相應修改:
You also need to replace the CMS cart page’s label to /checkout/cart, so that the CMS cart page can be found and loaded.
因為Spartacus調用CMS API讀取CMS page 的數據,是將page label ID作為參數傳入url里的。
總結
以上是生活随笔為你收集整理的如何自定义SAP Spartacus的路由路径的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SAP Spartacus index.
- 下一篇: git for windows的下载地址