[TYPO3-dev] New Element Wizard has no option for hiding Elements via pageTS

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Oct 22 11:50:58 CEST 2008


Steffen Kamper wrote: on 22.10.2008 11:21:

>> I would start with a blank list and add the entries via PageTS, and have
>> no hardcoded array in PHP. The "default set" that we currently see could
>> be added automatically by a default PageTS provided by the "cms"
>> extension.
>>
>> mod.xMOD_db_new_content_el.elements {
>>     common.header = LLL:common
>>     common.elements {
>>         regularText {
>>             icon = gfx/c_wiz/regular_text.gif
>>             title = LLL:common_regularText_title
>>             description = LLL:common_regularText_description
>>             tt_content_defValues.CType = text
>>         }
>>         textImage {
>>             ...
>>         }
>>         ...
>>     }
>>     common.order = regularText,textImage,...
>>     ...
>>     plugins.header = LLL:plugins
>>     plugins.elements {
>>         1.general {
>>             icon = gfx/c_wiz/user_defined.gif
>>             title = LLL:plugins_general_title
>>             description = LLL:plugins_general_description
>>             tt_content_defValues.CType = list
>>         }
>>     }
>> }

> very good!
> TV can add a section with
>   FCE.header = LLL:FCE
>   FCE.elements {...}

Difficult, because FCEs are dynamic (from the database), but it might work.

>> This list has to be transformed into the PHP-array which we currently
>> have, because it could be manipulated by extensions via the
>> $TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses'] global
>> variable (most EXT only add to the plugin_ section).

> there might be a problem of order, the pageTS has to be parsed before
> extension adds/manipulates that array, this has to be examioned.

I have thought of that too, and that was why I had this row in my example:

    common.order = regularText,textImage,...

Probably easier to maintain and to "add" elements to (e.g. with
:addToList and :removeFromList typoscript functions).

Maybe we need to extend that function with parameters like:

... := addToList(before:regularText ourNewElement)
... := addToList(first ourNewElement)

> In general this is indeed a very flexible way, it also keeps
> backward-compatibility if we add the default elements to the default
> pageTS.
> 
> So these are the steps i see to get it that way:
> 1) create a TS-setting represent the default situation
> 2) modify new_element_wizard to read this into $wizard

Yes, that would be part 1, a patch to the core.

> 3) change TV to use the cms wizard
>
> As your proposal is so good, step 1 can be done very fast.
> We have some grouping here that we should keep:
> common
> special
> forms
> [fce]
> plugins
> 
> may be we allow own types as well, so don't care about FCE, so user can
> use own types as well
> fce
> prefilled
> ....
> so he even can rearrange existing ones or group it in another way.

Yes, I think it should be so flexible that any grouping is possible.
Some sites might only want "fce's" and no "common" or "special" elements
at all. That would be very cool, indeed.

Cheers,
Ernesto




More information about the TYPO3-dev mailing list