[TYPO3-50-general] Need help with Routing

Bastian Waidelich bastian at typo3.org
Wed Feb 18 19:39:18 CET 2009


Christoph Blömer wrote:

Hi Christoph,

> I also had to add
>  controllerObjectNamePattern: F3\WebDAV\Controller\DefaultController
> otherwise it didn't work.

It should work otherwise, cause the default controllerObjectNamePattern 
is "F3\@package\Controller\@controllerController", @package and 
@controller being replaced by their respective default values.
I've just tried it successfully with the route:

WebDAV:
   uriPattern: 'webdav(/{path})'
   defaults:
     @package:    'WebDAV'
     @controller: 'Default'
     @action:     'index'
     path:        '/'
   routePartHandlers:
     path: 'F3\WebDAV\RoutePartHandler\WebDAVRoutePartHandler'


> But it would be nice to define that as local routes.

Think of FLOW3 as framework for your Web application. You don't want the 
packages to affect or even override your Routing setup automatically. 
Furthermore it would be hard to tell in which order local and global 
Routes would be matched.


> Maybe localroutes are deactivated by default and you can active them by 
> adding one line of code to the global routes configuration.
 > Or something like:
 >
 > WebDAV:
 >    uriPattern: 'webdav'
 >    routesConfig: 'WebDAV/Configuration/Routes.yaml'

Yes, that's an idea. Thanks for the input!
Only:
The way a Route looks 
("http://mydomain.tld/news/article/my-article.html" vs 
"http://mydomain.tld/news-article/my-article", vs 
"http://mydomain.tld/news/article/1")
concerns your application, not the packages. In other words: I don't 
want to edit the Routes.yaml in my News package to add the ".html" 
suffix to my URIs.
On the other hand packages should be able to provide an appropriate 
Routing setup which can be "copied" somehow into the main Routing 
configuration.
Also, there will be "Subroutes". Especially for TYPO3 plugin packages 
this feature will be needed..

Bastian


-- 
slice up the elephant, baby!


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