[TYPO3-timtab] My Widget concept - and why its not list_type
Lina Wolf
liste at linawolf.de
Thu Aug 12 20:58:09 CEST 2010
Hello,
there was criticism to my new timtab widget concept. So I would like to explain what the plan was. It can maybe not be seen in the source code at the moment as I neither finished nor commented enough this rather new addition.
I agree with you, Ingo, that flexforms should be used in extension plugins. But flexforms have one drawback: They cannot be easily extended by extensions extending the main extension.
If you look at tt_news and mpossnewssorting, for example. After tt_news is updated to 3.0 mpossnewssorting will break the whole plugin as it copied the flexform and overrides it. Now mpossnewssorting would have to be changed. Therefore flexforms are as unflexible as xClasses and create the same kind of problems.
So my plan was to create an own widget_type for timtab and on changing the widget_type of the plugin each widget may have its own flexform - even if it was created by an extension.
I wanted it to be possible to create new widgets even without having to create an extension simply by TypoScript Setup and some TSconfig. This is already possible by now.
At first I thought of calling the widgets PHP-Code - if needed - by a hook. But then I thought to be even more flexible and to prevent all hooks from beeing called each time a widget is displayed. So I thought maybe to change the calling of a widgets PHP-Code from a userfunc.
If like that in a project a widget could be written without having tzo write an extension unless a flexform is needed.
I was hoping it was possible to use the same pi_flexform field like for the list_type. But that is not possible as flexforms can only be used for one set of fields (pi_flexform for*list_type, CType as specified in*$TCA['tt_content']['columns']['pi_flexform']['config']['ds_pointerField'] = 'list_type,CType';)
Therefore my plan was to create an own widget type for timtab witch comes with its own flexforms. This is the only way it could be achieved without changing the core.
So maybe you have a better idea to achieve a truly flexible solution. I would be very interested to hear about it as I have been breaking my head in trying to fin a solution.
Maybe look at t3lib_befunc.php:getFlexFormDS I think the problem lies in the fact that only one configuration of fields can be used here.
Greetings Lina
More information about the TYPO3-project-timtab
mailing list