I really like the ease Typo3 9.5.0 is creating speaking URL's.
The only problem I do have is to make it work with extensions like news. Could not find a way to make it work and have no clue where to start. Appreciate your help.
Best regards Dan
TYPO3 9.5.0 News 7.0.7
You can do this with the routeEnhancers
directive in your site configuration YAML file (typically htdocs/config/sites//config.yaml). There is an example in the official documentation, though hidden a little bit:
This is a configuration I am actively using:
rootPageId: <site id>
...
routeEnhancers:
NewsPlugin:
type: Extbase
limitToPages:
- 49 (when your news detail page id is 49)
- ...
extension: News
plugin: Pi1
routes:
-
routePath: '/blog/{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: '/archive/{year}/{month}'
_controller: 'News::archive'
defaultController: 'News::list'
defaults:
page: '0'
aspects:
news_title:
type: PersistedAliasMapper
tableName: tx_news_domain_model_news
routeFieldName: path_segment