I have created a extension using extension builder in typo3 7.6.2 version. Now I would like to add flexform to extension 'Products' for detail page PID. But I tried my best to integrate flexform but it did not work.
Here is my code -
In ext_tables.php -
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'Wxproducts.' . $_EXTKEY,
'Wxproducts',
'Products'
);
// flexform integration
$pluginSignature = str_replace('_','','Wxproducts'.$_EXTKEY) . '_products';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
t3lib_extMgm::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform_products.xml');
In Configuration/FlexForms/flexform_products.php -
<T3DataStructure>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>Function</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<switchableControllerActions>
<TCEforms>
<label>Select function</label>
<config>
<type>select</type>
<items>
<numIndex index="0">
<numIndex index="0">List</numIndex>
<numIndex index="1">Products->list</numIndex>
</numIndex>
<numIndex index="1">
<numIndex index="0">Detail</numIndex>
<numIndex index="1">Products->show</numIndex>
</numIndex>
</items>
</config>
</TCEforms>
</switchableControllerActions>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
Its not working. I am unable to figure out whats the problem. Any idea!
Thanks in Advance!
Your $pluginSignature variable seems to be wrong, it has the vendor name on it. Try the following code:
Here's an example taken from TYPO3 Extbase book:
simpleblog is the extension key, and bloglisting is the plugin name.