[TYPO3-mvc] RFC #8318 : New feature: change initial controller and action via FlexForm.

Michael Feinbier mf at hdnet.de
Thu Jun 17 13:02:34 CEST 2010


Hey everybody,

This is an SVN patch request.

Type: New feature

Bugtracker references:
http://forge.typo3.org/issues/8318

Problem:
There is no way to override the 'default' controller and action 
dispatched when a plugin is called.
You are able to use the "switchableControllerActions"-override via 
flexform but this is just a dirty workaround because if you have a new 
action which shall be reached from all plugins you have to edit all your 
tt_content records to extend the switchableControllerActions.

Solution:
In FrontendConfigurationManager.php we need an additional method like 
"overrideFirstControllerActionFromFlexform" which is called directly 
after "overrideSwitchableControllerActionsFromFlexform"

Notes:
Now you can override the start controller and action via flexform.
For the blog_example it would look like this:

<firstControllerAction>
     	<TCEforms>
     		<label>First Controller and Action</label>
     		<config>
     			<type>select</type>
<items type="array">
	<numIndex index="0" type="array">
		<numIndex index="0">List all Blogs</numIndex>
		<numIndex index="1">Blog->index</numIndex>
	</numIndex>
	<numIndex index="1" type="array">
		<numIndex index="0">Create new Blog</numIndex>
		<numIndex index="1">Blog->new</numIndex>
	</numIndex>
</items>
     		</config>
     	</TCEforms>
</firstControllerAction>

Hope you like and need it, too ;)

Greetings

Micha



More information about the TYPO3-project-typo3v4mvc mailing list