[TYPO3-mvc] Extbase: How to define default controller and default action?

Bastian Waidelich bastian at typo3.org
Wed Nov 2 17:48:24 CET 2011


Roland wrote:

Hi Roland,

> how can i define the default controller and default action?

In Extbase, the first controller of a plugin is the default.
The first action in the list of actions is the default action.

So, in order to change the default controller/action, simply adjust the 
Tx_Extbase_Utility_Extension::configurePlugin() code in the 
ext_localconf.php file of the extension.

If you need multiple defaults, I'd suggest to create multiple plugins.
A plugin in Extbase is just a collection of controller & actions, so it 
is really "cheap".

If you only want to have one plugin and still want to change the default 
controller/action, you can use the switchableControllerAction option, as 
Daniel mentioned. But that comes at some cost (you can't use the 
skipDefaultArguments feature and you can't have custom flexforms for 
every view).

HTH
Bastian


More information about the TYPO3-project-typo3v4mvc mailing list