I have set up an extbase extension in a TYPO3 4.5 site with the extension builder, containing just the default listAction in the controller.
Now I would like to add a new Action, and it doesn't work.
I don't need (aka. can't get to work) a flexform to choose the controller action.
As there's a field "Plugin mode", I thought I could just manually enter the action here:
And extend the plugin configuration as such in ext_localconf.php:
Tx_Extbase_Utility_Extension::configurePlugin(
$_EXTKEY,
'Pluginname',
array(
'Controllername' => 'list,listfeatured',
),
);
Also, in the controller, I have added a new action.
/**
* action listfeatured
*
* @return void
*/
public function listfeaturedAction() {
// do something
}
But, alas, the action is not called at all.
Did I interpret the field "plugin mode" wrong? Did I miss something?
Alternatively: Can I set the action for a "backend" plugin via TS as well?
You need to use FlexForm correctly to set list of switchable actions.
Other option is creating another plugin for which default action is listfeatured
.
If you will decide to use single plugin only just you need to show/describe us what did you try in FlexForm (probably new question)
Edit: As you showed us yourself in your question it's you deciding which Controller
and action
are default for given plugin, so to add new plugin which will use existing controller, just add this to your ext_localconf.php
Tx_Extbase_Utility_Extension::configurePlugin(
$_EXTKEY,
'MyFeaturedPlugin',
array(
'Controllername' => 'listfeatured',
),
);
you may also need to registerPlugin
in your ext_tables.php
if you want to be able to use it in BE (can be ommited if ie. plugin should be placed only with TS). You will do this with: Tx_Extbase_Utility_Plugin::registerPlugin