【问题标题】:Page service in spartacus?斯巴达克斯的页面服务?
【发布时间】:2020-02-18 18:21:03
【问题描述】:

如果CMSService.getComponentData()是获取组件数据(Component Controller大摇大摆)。

我可以知道需要什么服务来获取包含 CMS 内容槽列表的页面数据(Page Controller in swagger)?

【问题讨论】:

    标签: spartacus-storefront


    【解决方案1】:

    核心库中的CmsService 提供了一种基于当前路由获取当前页面的方法:

    CmsService.getCurrentPage()

    这会返回一个带有 Page 的 observable。

    在底层,页面是根据页面context选择的,页面有一个页面类型(产品、类别、内容)和id(产品代码、类别)代码,搜索查询)。

    【讨论】:

      猜你喜欢
      • 2021-05-27
      • 2021-09-11
      • 1970-01-01
      • 2021-04-24
      • 1970-01-01
      • 1970-01-01
      • 2020-09-23
      • 2022-09-29
      • 1970-01-01
      相关资源
      最近更新 更多