且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SAP Commerce的Content Page,Content Slot和Component在Spartacus里的应用

更新时间:2022-09-14 22:31:11

按照这篇文章SAP Spartacus的自定义路由里介绍的方式,在SAP Spartacus里创建自定义路由,使用如下url访问:


https://spartacus-dev0.eastus.cloudapp.azure.com:9002/occ/v2/electronics-spa/cms/pages?fields=DEFAULT&pageType=ContentPage&pageLabelOrId=%2Fcustom&lang=en&curr=USD


后台会观察到一个HTTP 404错误:


SAP Commerce的Content Page,Content Slot和Component在Spartacus里的应用SAP Commerce的Content Page,Content Slot和Component在Spartacus里的应用

{
   "errors" : [ {
      "message" : "No content page found matching the provided label or id: /custom",
      "type" : "CMSItemNotFoundError"
   } ]
}

SAP Commerce的Content Page,Content Slot和Component在Spartacus里的应用SAP Commerce的Content Page,Content Slot和Component在Spartacus里的应用SAP Commerce的Content Page,Content Slot和Component在Spartacus里的应用看一个请求成功的例子:


https://spartacus-dev0.eastus.cloudapp.azure.com:9002/occ/v2/electronics-spa/cms/pages?fields=DEFAULT&pageType=ContentPage&pageLabelOrId=%2Ffaq&lang=en&curr=USD


SAP Commerce的Content Page,Content Slot和Component在Spartacus里的应用SAP Commerce的Content Page,Content Slot和Component在Spartacus里的应用