问题
I try to create speaking URL out of an action-link in TYPO3 9.5 to let the next page know from where the user came from.
When I use this code for the action-link:
<f:link.action pageUid="296" action="show" controller="Author" arguments="{author : blogentry.author, categoryParent : filtercategories.uid}"> {blogentry.author.firstname} {blogentry.author.surename}
</f:link.action>
and this in my config.yaml:
BlogAuthorPluginShow:
type: Extbase
extension: Blog
plugin: Blogauthors
routes:
- routePath: '/{author_title}'
_controller: 'Author::show'
_arguments:
'author_title': author
defaultController: 'Author::list'
aspects:
author_title:
type: PersistedAliasMapper
tableName: 'tx_ivsblog_domain_model_author'
routeFieldName: 'pathsegment'
it doesn't work because of the second argument (, categoryParent : filtercategories.uid
). If I remove the second argument and write it like this it works:
<f:link.action pageUid="296" action="show" controller="Author" arguments="{author : blogentry.author}"
> {blogentry.author.firstname} {blogentry.author.surename}
</f:link.action>
How can I manage it to give the controller a second argument and make the slug work?
回答1:
The argument categoryParent
is not registered in config.yaml
.
I'm not sure if it's enough to register it and use it there but i'd consider it as minimum requirement.
来源:https://stackoverflow.com/questions/57637619/typo3-slug-not-working-with-multiple-arguments-in-flink-action