[TYPO3-50-general] Need help with Routing

Christoph Blömer chbloemer at gmx.net
Wed Feb 11 06:35:24 CET 2009


Bastian Waidelich schrieb:
> Christoph Blömer wrote:
>
> Hi Christoph,
>
>   
>> I have the following Routes.yaml
>>
>> WebDAV_Default:
>>  uriPattern: 'webdav/[path]'
>>  defaults:
>>    @package:    'WebDAV'
>>    @controller: 'Default'
>> [...]
>> Now I enter the URL  http://localhost/webdav/Folder1/SubFolder2/
>> I get the Exception
>>     
>
> With the default Route mechanism this is not possible with only one 
> Route as it is now.
>
> But you can register your own "RoutePartHandler". That must extend 
> F3::FLOW3::MVC::Web::Routing::DynamicRoutePart. Check out the 
> BlogExample for a working example of a really simple but working 
> RoutePartHandler.
> It's configured like this:
>
> post:
>    uriPattern: 'posts/[postUUID].html'
>    defaults:
>      @package: 'Blog'
>      @controller: 'Posts'
>      @action: 'show'
>    routePartHandlers:
>      postUUID: 'F3::Blog::RoutePartHandlers::PostRoutePartHandler'
>
>
> Please note: the implementation of custom RoutePartHandlers might change 
> in the future and Routes are not cached yet.
>
> If you need help or have feedback, let me know!
> Bastian
>   
Hi Bastian,
yes I need help. I just played around a little, but I think the 
RoutePartHandler doesn't solve my problem.
I have to define somehow that when the uriPattern starts with "webdav/" 
that always the DefaultController of the WebDAV Package is called.
The URI can have infinite path segments. So I just need the whole string 
after "webdav/"
And I don't want to define a infinite amount of routes. ;-)
Maybe it needs changes in the routing mechanism/concept.

Maybe it needs some kind of cascade,priority or hierachy in the routing 
mechanism. Some kind of fallback route/fallback controller or so. Or 
like Karsten wrote an extra symbol like * which allows such a route.
But you are more into it. Just some ideas.

I really need this to work somehow for my Master Thesis.

Thanks and waiting for your feedback. ;-)
Christoph








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