php – flexform in typo3 7.6.2无法正常工作
作者:互联网
我在typo3 7.6.2版本中使用扩展构建器创建了一个扩展.现在我想将flexform添加到扩展名’Products’以获取详细信息页面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>
它不起作用.我无法弄清楚问题是什么.任何的想法!
提前致谢!
解决方法:
您的$pluginSignature变量似乎是错误的,它上面有供应商名称.请尝试以下代码:
$extensionName = strtolower(\TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($_EXTKEY));
$pluginSignature = $extensionName.'_products';
以下是TYPO3 Extbase书中的一个示例:
$pluginSignature = 'simpleblog_bloglisting';
simpleblog是扩展密钥,bloglisting是插件名称.
标签:php,typo3,extbase,fluid,extension-builder3 来源: https://codeday.me/bug/20190623/1270138.html