[Typo3-dev] Flexforms for menu_type

Wolfgang Klinger wolfgang at stufenlos.net
Fri Feb 25 14:58:57 CET 2005


 Hi!

 On Fri, 25 Feb 2005, Jean-David Gadina wrote the following:
> So is there a way to use flexforms for something else than a «list_type» plugin?
> 

 I currently work on an extension for "sitemaps" too and have solved
 this problem as follows:

 (1) add a new column to tt_content (there's no other way IMHO)
----
#
# Table structure for table 'tt_content'
#
CREATE TABLE tt_content (
    menu_flexform text
);
----

 (2) modify ext_tables.php
----
$tempColumns  =  Array (
    'menu_flexform'  => Array (
        'label'  => 'LLL:EXT:myext/locallang_db.php:tt_content.menu_flexform',
        'config'  => Array (
            'type'  => 'flex',
            'ds_pointerField'  => 'menu_type',
        )
    ),
);
['tt_content']['types']['menu']['subtypes_addlist'][$_EXTKEY.'_pi1'] = 'menu_flexform';

$TCA['tt_content']['columns']['menu_flexform']['config']['ds'] = array($_EXTKEY.'_pi1' => 'FILE:EXT:myext/flexform_ds.xml');
----

 That's it I think...

 If you could stick to the same name "menu_flexform" we save one column
 if somebody installs both extensions (and some others that may follow);


 bye
 Wolfgang






More information about the TYPO3-dev mailing list