Monday, 4 June 2018

Using FlexForm when creating new content cType in TYPO3 plugins

I'm adding new content types to my TYPO3 and I want to use FlexForms to define each content type options form.

I have followed this example: https://docs.typo3.org/typo3cms/extensions/fluid_styled_content/latest/AddingYourOwnContentElements/

And modified it to use FlexForms from this example: https://wiki.typo3.org/Extension_Development,_using_Flexforms

But I believe I don't quite understand the settings in Configuration/TCA/Overrrides/tt_contant.php:

// Adds content new content elements
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
    [
        'LLL:EXT:lu_content/Resources/Private/Language/locallang.xlf:contacts.title',
        'lu_content__contacts',
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('lu_content').'Resources/Public/Icons/Contacts.svg',
    ],
    'CType',
    'lu_content'
);

$GLOBALS['TCA']['tt_content']['types']['lu_content__contacts']['showitem']                       = 'CType;;;1-1-1,pi_flexform;;;1-1-1';
$GLOBALS['TCA']['tt_content']['columns']['pi_flexform']['config']['ds'][',lu_content__contacts'] = 'FILE:EXT:lu_content/Configuration/FlexForms/Contacts.xml';

The form works, but looks like this: enter image description here

How do I get the form not to fall under Plugin Options?

And how do I make the title/header to be used in to list view? Currently i get [notitle] after save in the content list.

enter image description here

Thank you in advance.

PS: I'm currently developing on TYPO3 v7 but with support for v8.



from Using FlexForm when creating new content cType in TYPO3 plugins

No comments:

Post a Comment