georgringer / routing-with-not-found-records
在PersistedAliasMapper中允许未找到的记录
1.0.0
2022-01-27 11:24 UTC
Requires
- typo3/cms-core: ^10 || ^11
README
此扩展使您能够使用PersistedAliasMapper
和缺失的记录。一个典型的用例是例如EXT:news与新闻记录。如果记录被隐藏、删除或达到开始/结束时间,则扩展现在可以再次处理,而不是触发页面未找到错误。
使用方法
- 使用
composer req georgringer/routing-with-not-found-records
安装。 - 在您的路由配置中将
PersistedAliasMapper
替换为PersistedAliasMapperWithNotFoundRecords
。
完整示例
routeEnhancers: News: type: Extbase extension: News plugin: Pi1 routes: - routePath: '/{news-title}' _controller: 'News::detail' _arguments: news-title: news aspects: news-title: type: PersistedAliasMapperWithNotFoundRecords tableName: tx_news_domain_model_news routeFieldName: path_segment