TYPO3 9中如何设置新闻的说话链接
How set up speaking links for news in TYPO3 9
是否可以在 TYPO3 9 中为 EXT:tt_news 设置语音 url,就像在以前版本中使用 RealUrl 一样?
你可以看看这个手册“Routing Enhancers and Aspects”
您的站点配置中需要路由增强器。在 TYPO3 后端创建项目后,项目中应该有一个 config.yaml
(在 "Site Configuration" -> "Sites" 下)。
之后,您可以在此处的文档(新闻)中找到一个工作示例:
Route Enhacer Documentation
我目前实现的一个工作路由增强器如下所示:
NewsPlugin:
type: Extbase
extension: News
plugin: Pi1
routes:
- { routePath: '/blog/{news_title}', _controller: 'News::detail', _arguments: {'news_title': 'news'} }
aspects:
news_title:
type: PersistedAliasMapper
tableName: 'tx_news_domain_model_news'
routeFieldName: 'path_segment'
routeValuePrefix: '/'
请记住,此配置删除了文档中的一些示例,并且不支持分页。
是否可以在 TYPO3 9 中为 EXT:tt_news 设置语音 url,就像在以前版本中使用 RealUrl 一样?
你可以看看这个手册“Routing Enhancers and Aspects”
您的站点配置中需要路由增强器。在 TYPO3 后端创建项目后,项目中应该有一个 config.yaml
(在 "Site Configuration" -> "Sites" 下)。
之后,您可以在此处的文档(新闻)中找到一个工作示例: Route Enhacer Documentation
我目前实现的一个工作路由增强器如下所示:
NewsPlugin:
type: Extbase
extension: News
plugin: Pi1
routes:
- { routePath: '/blog/{news_title}', _controller: 'News::detail', _arguments: {'news_title': 'news'} }
aspects:
news_title:
type: PersistedAliasMapper
tableName: 'tx_news_domain_model_news'
routeFieldName: 'path_segment'
routeValuePrefix: '/'
请记住,此配置删除了文档中的一些示例,并且不支持分页。