Typo3 9 - 路由 - 新闻列表中的 cHash
Typo3 9 - routing - cHash in news list
我正在使用以下 config.yaml 作为标准新闻插件:
NewsPlugin:
type: Extbase
limitToPages:
- 3
- 15
extension: News
plugin: Pi1
routes:
-
routePath: '/l/{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: '/archiv/{year}/{month}'
_controller: 'News::archive'
defaultController: 'News::list'
defaults:
page: '0'
news_title: ''
tag_name: ''
year: '2019'
month: '01'
aspects:
news_title:
type: PersistedAliasMapper
tableName: tx_news_domain_model_news
routeFieldName: path_segment
现在一切正常,唯一的问题是,当我使用分页时,总是有一个 cHash 附加到我的 url。像第 2 页的 link 结果是
http://www.example.com/newspage/l/2?cHash=313213213213213a2f13asf321
知道为什么会这样吗?
如果requirements are too loose or if there are no requirements at all. It can also be avoided with a StaticRangeMapper.
将加现金
我也在努力设置新闻路由增强器。您可以查看 以了解在不使用 cHash 的情况下应用分页。
感谢 ben,我找到了一个有效的解决方案:
NewsPlugin:
type: Extbase
extension: News
plugin: Pi1
routes:
-
routePath: '/l/{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: '/archiv/{year}/{month}'
_controller: 'News::archive'
defaultController: 'News::list'
defaults:
page: '0'
news_title: ''
tag_name: ''
year: '2019'
month: '01'
aspects:
news_title:
type: PersistedAliasMapper
tableName: tx_news_domain_model_news
routeFieldName: path_segment
'@widget_0/currentPage':
type: StaticRangeMapper
start: '1'
end: '1000'
我正在使用以下 config.yaml 作为标准新闻插件:
NewsPlugin:
type: Extbase
limitToPages:
- 3
- 15
extension: News
plugin: Pi1
routes:
-
routePath: '/l/{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: '/archiv/{year}/{month}'
_controller: 'News::archive'
defaultController: 'News::list'
defaults:
page: '0'
news_title: ''
tag_name: ''
year: '2019'
month: '01'
aspects:
news_title:
type: PersistedAliasMapper
tableName: tx_news_domain_model_news
routeFieldName: path_segment
现在一切正常,唯一的问题是,当我使用分页时,总是有一个 cHash 附加到我的 url。像第 2 页的 link 结果是
http://www.example.com/newspage/l/2?cHash=313213213213213a2f13asf321
知道为什么会这样吗?
如果requirements are too loose or if there are no requirements at all. It can also be avoided with a StaticRangeMapper.
将加现金我也在努力设置新闻路由增强器。您可以查看
感谢 ben,我找到了一个有效的解决方案:
NewsPlugin:
type: Extbase
extension: News
plugin: Pi1
routes:
-
routePath: '/l/{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: '/archiv/{year}/{month}'
_controller: 'News::archive'
defaultController: 'News::list'
defaults:
page: '0'
news_title: ''
tag_name: ''
year: '2019'
month: '01'
aspects:
news_title:
type: PersistedAliasMapper
tableName: tx_news_domain_model_news
routeFieldName: path_segment
'@widget_0/currentPage':
type: StaticRangeMapper
start: '1'
end: '1000'