TYPO3-Slug not working with multiple arguments in f:link.action

霸气de小男生 提交于 2020-01-04 11:10:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!