[TYPO3-mvc] controller and action cannot be excluded from url

Felix Oertel mehl at foertel.com
Wed Apr 28 16:44:15 CEST 2010


Hi,

Am 28.04.10 16:05, schrieb Franz Koch:
> but if I don't need/want the controller name in the URL over and over again? ;)

You could write a custom viewHelper adding controllerName and actionName 
to $argumentsToBeExcludedFromQueryString. (taking my patch into account)

> In FLOW3 the controller must be given in the URL IIRC

IMHO we do not have to stay in sync with FLOW3 here. The hole routing 
works little different in v4.

In FLOW3 (without framework like v5) you're not able to determine which 
controllerAction to use without relying on the GET-parameters. In 
extbase we can use plugin config, TS, flexform, etc pp so we do not 
_need_ the parameters.

> but in TYPO3 v4 with realUrl you're going nuts trying to get clean URLs with all those controller and action dependencies.

this is not an realUrl specific problem ;) even without realUrl some 
would like to avoid too much get-params.

> So maybe only append the controller in the URL if a) a different action name then the default one is given and/or b) it's a link to a different page.

as long as you don't take further configuration on your plugin, you need 
the get-parameter to distinguish, which controller to use. IMHO the 
_default behaviour_ should be: allways include controllerName, include 
actionName if not default.

> <f:link.action arguments="{}">no action and no controller in the URL
> </f:link.action>

with default configuration your plugin would not be able to distinguish, 
what to do ... so, that would be a bad thing to use as default. ;-)

i suggest keeping the default behaviour but allowing to overwrite it if 
wanted.

regards, foertel



More information about the TYPO3-project-typo3v4mvc mailing list