0

I've implemented the tx_news search form with search subject, minimum date and maximum date.

Now I need to define the corresponding route enhancer for speaking URLs.

Unfortunately, I can't find an example of this in the documentation, nor can I find one on the web.

The URL looks i.e. like this https://mydomain.tld/news/?tx_news_pi1[search][subject]=Test&tx_news_pi1[search][minimumDate]=2023-02-01&tx_news_pi1[search][maximumDate]=2023-02-10

I have tried the following configuration - but it does not work:

routeEnhancers:
    NewsPlugin:
        type: Extbase
        extension: News
        plugin: Pi1
        routes:
            - routePath: '/suche/{minimum_date}-{maximum_date}-{search_term}'
                _controller: 'News::list'
                _arguments:
                    search_term: search/subject
                    minimum_date: search/minimumDate
                    maximum_date: search/maximumDate

Environment

TYPO3 version: 11.5.24
news version: 10.0.3
Composer Mode: no
Peter Kraume
  • 3,577
  • 2
  • 21
  • 39
boogie76
  • 41
  • 4
  • Your enhancer is pointing to `News::list` which does not have a `search`-parameter... IMO, you'd like to configure `_controller: 'News::searchResult'` – Julian Hofmann Feb 22 '23 at 12:46

1 Answers1

0

And here is my working solution: https://github.com/georgringer/news/issues/2014

boogie76
  • 41
  • 4