0

How to migrate from realurl in TYPO3 9.5 ?

I have a list view where you can filter by category AND year. Filter by category only and filter by year only works, but I it doesnt work for a combined filter as with realurl before. (first route see below)

my current url is: events?tx_news_pi1[overwriteDemand][categories]=34&tx_news_pi1[overwriteDemand][year]=2019

my desired url: events/2019/categoryname

routeEnhancers:
  News:
    type: Extbase
    extension: News
    plugin: Pi1
    limitToPages:
      # list and detail page
      - 6
      - 42
    routes:
      # this doesn't work for events?tx_news_pi1[overwriteDemand][categories]=34&tx_news_pi1[overwriteDemand][year]=2019
      # with realurl the path was: events/2019/categoryname
      - routePath: '/{date-year}/{category-name}'
        _controller: 'News::list'
        _arguments:
          category-name: overwriteDemand/categories
          date-year: overwriteDemand/year
        requirements:
          date-year: '\d+'
    defaultController: 'News::list'
    defaults:
      date-year: ''
    aspects:
      date-year:
        type: StaticRangeMapper
        start: '2000'
        end: '2030'
      category-name:
        type: PersistedAliasMapper
        tableName: sys_category
        routeFieldName: slug
Stefan Mielke
  • 388
  • 2
  • 11
  • Here is best practice documentation for URL routing, https://docs.typo3.org/p/georgringer/news/master/en-us/AdministratorManual/BestPractice/Routing/Index.html. Thanks to @georgringer ! – Geee Mar 06 '20 at 04:19
  • Thanks for the link. I got the config from there. However the combination with two filters doesnot work. – Stefan Mielke Mar 06 '20 at 08:40
  • You should place your actual URL as well as your desired URL so everyone can get a better idea. – Geee Mar 06 '20 at 09:13

0 Answers0