Routing 打字3 9-路由-新闻列表中的裂缝

Routing 打字3 9-路由-新闻列表中的裂缝,routing,typo3,typo3-9.x,Routing,Typo3,Typo3 9.x,我使用以下config.yaml作为标准新闻插件: NewsPlugin: type: Extbase limitToPages: - 3 - 15 extension: News plugin: Pi1 routes: - routePath: '/l/{page}' _controller: 'News::list' _arguments: page: '@widget_0/currentPage

我使用以下config.yaml作为标准新闻插件:

NewsPlugin:
  type: Extbase
  limitToPages:
    - 3
    - 15
  extension: News
  plugin: Pi1
  routes:
    -
      routePath: '/l/{page}'
      _controller: 'News::list'
      _arguments:
        page: '@widget_0/currentPage'
    -
      routePath: '/tag/{tag_name}'
      _controller: 'News::list'
      _arguments:
        tag_name: overwriteDemand/tags
    -
      routePath: '/{news_title}'
      _controller: 'News::detail'
      _arguments:
        news_title: news
    -
      routePath: '/archiv/{year}/{month}'
      _controller: 'News::archive'
  defaultController: 'News::list'
  defaults:
    page: '0'
    news_title: ''
    tag_name: ''
    year: '2019'
    month: '01'
  aspects:
    news_title:
      type: PersistedAliasMapper
      tableName: tx_news_domain_model_news
      routeFieldName: path_segment
现在一切都很好,唯一的问题是,当我使用分页时,我的url总是有一个缺口。就像第2页的链接一样


你知道为什么会这样吗

。这也可以通过一个简单的方法来避免


我也在努力为新闻设置通道。您可以查看没有裂缝的分页。

感谢ben,我找到了一个有效的解决方案:

NewsPlugin:
  type: Extbase
  extension: News
  plugin: Pi1
  routes:
    -
      routePath: '/l/{page}'
      _controller: 'News::list'
      _arguments:
        page: '@widget_0/currentPage'
    -
      routePath: '/tag/{tag_name}'
      _controller: 'News::list'
      _arguments:
        tag_name: overwriteDemand/tags
    -
      routePath: '/{news_title}'
      _controller: 'News::detail'
      _arguments:
        news_title: news
    -
      routePath: '/archiv/{year}/{month}'
      _controller: 'News::archive'
  defaultController: 'News::list'
  defaults:
    page: '0'
    news_title: ''
    tag_name: ''
    year: '2019'
    month: '01'
  aspects:
    news_title:
      type: PersistedAliasMapper
      tableName: tx_news_domain_model_news
      routeFieldName: path_segment
    '@widget_0/currentPage':
      type: StaticRangeMapper
      start: '1'
      end: '1000'

非常感谢你,这正是我所需要的!成功了!我刚刚尝试了您的新解决方案:从/l/2(第2页)到第一页的分页器链接有许多get参数,如?tx_news_pi1%5Baction%5D=list&tx_news_pi1%5Bcontroller%5D=news&cHash=123456789。它在您的环境中工作吗?