[Flow] Routes as described in the documentation don't work
Bastian Waidelich
bastian at typo3.org
Tue Jul 7 11:11:25 CEST 2015
On 27.06.15, at 12:44, Patric Eckhart wrote:
Hi Patric,
> the link in my fluid template like:
> <f:link.action action="show" controller="staticContent"
> arguments="{staticContent:
> '27c75af9-6236-55f4-8a1b-d74f18386298'}">Impressum</f:link.action>
>
> and in my Routes.yaml i have -
> name: 'Single product route'
> uriPattern: 'content/{StaticContent}'
> defaults:
> '@package': 'MyCool.Project'
> '@controller': 'StaticContent'
> '@action': 'show'
> routeParts:
> StaticContent:
> objectType: 'MyCool\Project\Domain\Model\StaticContent'
> uriPattern: '{title}'
So in your route you declare "{StaticContent}" to be of type
*MyCool\Project\Domain\Model\StaticContent* but in the template you pass
it a string.
It should be:
<f:link.action action="show" controller="staticContent"
arguments="{StaticContent: staticContent}">Impressum</f:link.action>
Where {staticContent} is an instance of
MyCool\Project\Domain\Model\StaticContent.
HTH
--
Bastian Waidelich
More information about the Flow
mailing list