[Flow] Routes with slash in path
Steffen Wickham
steffen at gaming-inc.de
Fri Apr 11 17:12:28 CEST 2014
The findValueToMatch() method was the trick! Now it's working! :-)
Thanks Bastian!
Thanks Christian!
:-)
Am 11.04.14 16:57, schrieb Bastian Waidelich:
> Steffen Wickham wrote:
>
> Hi Steffen,
>
>> In this project I use the content repository and want to edit a
>> specific node in it.
>> So I added a dynamic route part handler class and a route
>> configuration to my project.
>> The configuration part is based on the Routes.Frontend.yaml of TYPO3
>> Neos and the route part handler is configured as well. When I try to
>> access a node below root ("/") everything is fine (e.g.
>> "/familyguy"), but when I want to access any child node below this
>> string and the path contains a slash character (e.g.
>> "/familyguy/peter"),
>> my route part handler only gets an empty string as parameter in
>> matchValue() method.
>
> Could you share the Routes setup and your custom RoutePartHandler?
>
>> Is there some configuration switch which I have to enable for using
>> slashes in path?
>
> No, but if your RoutePartHandler extends DynamicRoutePart you have to
> make sure to override findValueToMatch() so that it doesn't stop at
> the first slash (see [1]). That's what the
> "FrontendNodeRoutePartHandler" in Neos does as well[2].
>
> Best,
>
>
> [1]
> https://git.typo3.org/Packages/TYPO3.Flow.git/blob/HEAD:/Classes/TYPO3/Flow/Mvc/Routing/DynamicRoutePart.php#l84
>
>
> [2]
> https://git.typo3.org/Packages/TYPO3.Neos.git/blob/HEAD:/Classes/TYPO3/Neos/Routing/FrontendNodeRoutePartHandler.php#l90
>
More information about the Flow
mailing list