[Flow] Routes with slash in path
Bastian Waidelich
bastian at typo3.org
Fri Apr 11 16:57:33 CEST 2014
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
--
Bastian Waidelich
More information about the Flow
mailing list