spartacus-storefront - 向 Spartacus 添加自定义页面

标签 spartacus-storefront

可能我的问题有点愚蠢,因为有很多关于路由的文档。问题是,我不是角度专家,所以我缺少一些上下文。

我想向 spartacus 添加一个自定义子页面 ( http://localhost:4200/image-upload )。页眉和页脚应该相同。只是内容应该是一个上传表单。

在哪里以及如何配置路由?

最佳答案

  1. 在 CMS 中添加带有页面标签 /image-upload 的新内容页面(带有前导斜杠)。 Spartacus 路由应该处理它 OOTB。 https://sap.github.io/cloud-commerce-spartacus-storefront-docs/adding-and-customizing-routes/
  2. 仅当您的页面具有自定义布局时才添加布局配置 https://sap.github.io/cloud-commerce-spartacus-storefront-docs/page-layout/#configuring-the-layout
  3. 实现应出现在此页面上的 Angular CMS 组件,并配置从 CMS 组件类型到实现的映射 https://sap.github.io/cloud-commerce-spartacus-storefront-docs/customizing-cms-components/#page-title

关于spartacus-storefront - 向 Spartacus 添加自定义页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60167493/

相关文章:

spartacus-storefront - 重新定义斯巴达克斯组件

sap-commerce-cloud - 如何让斯巴达克斯服务器端渲染在负载下执行?

spartacus-storefront - 如何从 SAP Spartacus 店面更改 BaseStore

spartacus-storefront - 如何扩展 ProductListComponent

spartacus-storefront - 在何处指定扩展 'spartacussampledataaddon' 的路径

javascript - webApplicationInjector.js:4 处未捕获错误 : https://127. 0.0.1 :9002 is not allowed to override this storefront.

styling - 将 OOTB 样式应用于扩展组件

angular - 如何在 Spartacus SSR 中记录 http 请求的时间,即使在 SSR 超时后也是如此

spartacus-storefront - 如何添加我的自定义页面解析器而不是 Spartacus 页面解析器?

angular - Spartacus - 从自定义 CMS 组件中检索数据