Hallo liebe TYPO3 Gemeinde,
ich schlage mich seit einiger Zeit mit folgendem Problem herum.
Frage: Kann eine Flexform in einem "totally new content Element" vom Type = CType erstellt werden?
1) Im Kickstarter erstelle ich ein neues Contentelement (FE "totally new content Element"). Sie hat den Testnamen "YXZ".
2) Die ext_tables.php sieht so aus.
<?php
if (!defined ('TYPO3_MODE')) die ('Access denied.');
t3lib_div::loadTCA('tt_content');
$TCA['tt_content']['types'][$_EXTKEY.'_pi1']['showitem']='CType;;4;button;1-1-1,header;;3;;2-2-2';
t3lib_extMgm::addPlugin(array('LLL:EXT:XYZ/locallang_db.xml:tt_content.CType_pi1',$_EXTKEY.'_pi1'),'CType');
?>
Bitte beachten: Sie ist vom Type "CType"!
3) Nun füge ich eine Flexform-Definition hinzu:
<?php
if (!defined ('TYPO3_MODE')) die ('Access denied.');
t3lib_div::loadTCA('tt_content');
$TCA['tt_content']['types'][$_EXTKEY.'_pi1']['showitem']='CType;;4;button;1-1-1,header;;3;;2-2-2,';
// + NEU ======================
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_pi1']='pi_flexform';
t3lib_extMgm::addPiFlexFormValue($_EXTKEY.'_pi1','FILE:EXT:'.$_EXTKEY.'/flexform.xml');
// - NEU ======================
t3lib_extMgm::addPlugin(array('LLL:EXT:XYZ/locallang_db.xml:tt_content.CType_pi1',$_EXTKEY.'_pi1'),'CType');
?>
Ergebnis: Die Flexform ist NICHT im BE zu sehen.
4) Also habe ich die Zeile einfach mal wie folgt am Ende mit pi_flexform erweitert:
<?php
$TCA['tt_content']['types'][$_EXTKEY.'_pi1']['showitem']='CType;;4;button;1-1-1,header;;3;;2-2-2,pi_flexform';
?>
Ergebnis: Es wird ein Flexform-Formular für eine Zugängliche Tabelle angezeigt. :o
Plugin Options:
Accessibility Table parsing
Table caption (<caption>)
Table summary ("summary" attribute in <table> tags)
Use table-footer (<tfoot> around last table row)
usw...
Meine Flexform-Definion aus der "/flexform.xml" wird also völlig ignoriert.
Wie kann ich das verhindern?
Ich habe schon tagelang alle Suchmaschinen rauf und runter gesucht. Und das Problem scheint wohl zu sein, dass Flexforms nicht mit Contentelementen vom Type CType zusammenarbeiten sondern nur mit list_type.
Für meinen Zweck brauche ich aber unbedingt eine Extension CType ("totally new content Element") + Flexform.
Wisst Ihr wie das zu bewerkstelligen ist?
Ich freue mich auf Euer Feedback!
Matthias