[TYPO3-50-general] Need help with Routing

Christoph Blömer chbloemer at gmx.net
Tue Feb 17 11:03:34 CET 2009


Bastian Waidelich schrieb:
> Christoph Blömer wrote:
>
> Hi Christoph,
>
> I've finally committed the Routing changes as you can read in the most 
> current thread.
> With the current architecture it's quite easy to achieve what you need:
>
> Let's say you have a package "WebDAV". Just create a subfolder 
> "RoutePartHandlers" and the WebDAVRoutePartHandler.php:
>
> declare(ENCODING = 'utf-8');
> namespace F3\WebDAV\RoutePartHandler;
>
> class WebDAVRoutePartHandler extends 
> \F3\FLOW3\MVC\Web\Routing\DynamicRoutePart {
>
> 	protected function findValueToMatch($requestPath) {
> 		return $requestPath;
> 	}
> }
>
> And than add a Route at the end of the global Routes.yaml:
>
> WebDAV:
>    uriPattern: 'webdav/{path}'
>    defaults:
>      @package:    'WebDAV'
>      @controller: 'Default'
>      @action:     'index'
>    routePartHandlers:
>      path: 'F3\WebDAV\RoutePartHandler\WebDAVRoutePartHandler'
>
> if you want the path to be optional, it should be something like:
>
> WebDAV:
>    uriPattern: 'webdav(/{path})'
>    defaults:
>      @package:    'WebDAV'
>      @controller: 'Default'
>      @action:     'index'
>      path:        '/'
>    routePartHandlers:
>      path: 'F3\WebDAV\RoutePartHandler\WebDAVRoutePartHandler'
>
>
> Obviously the RoutePartHandler above is not really WebDAV-related. All 
> it does is storing the part of the request Path that haven't been 
> matched yet.
> But you could easily improve it. Just have a look at the parent Class 
> DynamicRoutePart. And don't hesitate to post if you have further questions!
>   
Hi,
I used the RoutePartHandler to urldecode und utf8_decode my url.
But I just tried to open a folder with german Umlaute (äöüÄÖÜß) ;-)
So it seems if I return Umlaute in the findValueToMatch method I always 
get the flow3 default view.
The value $this->arguments['path']->getValue(); is empty.
Are there only special values allowed? Like A-Za-z0-9\-\_ ???

Christoph

> good luck,
> Bastian
> _______________________________________________
> TYPO3-project-5_0-general mailing list
> TYPO3-project-5_0-general at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-5_0-general
>
>   



More information about the TYPO3-project-5_0-general mailing list