Routes 用于自定义分页扩展的Type3 RouteEndhancer

Routes 用于自定义分页扩展的Type3 RouteEndhancer,routes,typo3,Routes,Typo3,我们为分页做了自定义扩展,因为我们有外部数据源。这会产生一个url,如 以下配置不起任何作用: routeEnhancers: VendorDspace: type: Extbase extension: VendorDspace plugin: VendorDspace routes: routePath: '/dspace-page/{page}' _controller: 'Publication::list'

我们为分页做了自定义扩展,因为我们有外部数据源。这会产生一个url,如

以下配置不起任何作用:

routeEnhancers:
  VendorDspace:
    type: Extbase
    extension: VendorDspace
    plugin: VendorDspace
    routes:
      routePath: '/dspace-page/{page}'
        _controller: 'Publication::list'
        _arguments:
          page: '@widget_0/currentPage'
    defaults:
      page: '0'
    aspects:
      page:
        type: StaticRangeMapper
        start: '1'
        end: '100'

有什么想法或技巧吗?

与我的配置相比,您的缩进错误

尝试:

路线:
路由路径:'/dspace page/{page}'
_控制器:“发布::列表”
_论据:
页面:“@widget_0/currentPage”
由于我有多条路线,您也需要中级路线:

路线:
-
路由路径:'/dspace page/{page}'
_控制器:“发布::列表”
_论据:
页面:“@widget_0/currentPage”

我必须添加-routePath:“/”和defaultController:“Publication::list”。一位同事发现了这个bug。请参阅完整配置:

routeEnhancers:
  VendorDspace:
    type: Extbase
    extension: VendorDspace
    plugin: VendorDspace
    routes:
      - routePath: '/'
        _controller: 'Publication::list'
      - routePath: '/dspace-page/{page}'
        _controller: 'Publication::list'
        _arguments:
          page: '@widget_0/currentPage'
    defaultController: 'Publication::list'
    defaults:
      page: '0'
    aspects:
      page:
        type: StaticRangeMapper
        start: '1'
        end: '100'

我在这里复制时删除了一个“-”,但这些并不能解决问题。我必须添加-routePath:“/”和defaultController:“Publication::list”。请看我的答案