我在typo3 7.6.2 版本中使用扩展生成器创建了一个扩展。现在我想将 flexform 添加到扩展“产品”以获取详细信息页面 PID。但是我尽力集成了flexform,但没有奏效。
这是我的代码 -
在 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');
在 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>
它不工作。我无法弄清楚是什么问题。任何想法!
提前致谢!