【发布时间】:2019-02-18 14:46:37
【问题描述】:
我为新闻插件配置了一些路由增强器:
routeEnhancers:
NewsPlugin:
type: Extbase
limitToPages: [3]
extension: News
plugin: Pi1
routes:
- { routePath: '/{news_title}', _controller: 'News::detail', _arguments: {'news_title': 'news'} }
- { routePath: '/tag/{tag_name}', _controller: 'News::list', _arguments: {'tag_name': 'overwriteDemand/tags'}}
- { routePath: '/category/{category_name}', _controller: 'News::list', _arguments: {'category_name': 'overwriteDemand/categories'}}
defaultController: 'News::list'
aspects:
news_title:
type: PersistedAliasMapper
tableName: 'tx_news_domain_model_news'
routeFieldName: 'path_segment'
对于类别视图,我现在得到的 URL 类似于 www.mydomain.com/category/2/?cHash=1234567889
三个问题: (1):如何摆脱cHash?这对 SEO 不友好。
(2):如何使用分类标题代替分类uid?我尝试添加一个方面:
category_name:
type: PersistedAliasMapper
tableName: 'sys_category'
routeFieldName: 'path_segment'
但没有成功,我收到了一条不明确的错误消息。
(3) 如何得到www.mydomain.com/de/kategorie/...这样的翻译后的URL?
欢迎任何提示。
【问题讨论】:
标签: routes typo3 tx-news typo3-9.x