[TYPO3-v4] t3lib_extMgm::addToAllTCAtypes() before:field / after:field became quite unhandy

Tolleiv.Nietsch info at tolleiv.de
Wed Jan 19 18:06:06 CET 2011


Hi,

I just wanted to raise that topic because I find it important to e.g. 
support extension maintainers / agencies with proper documentation about 
the following:

The "problem" is that using t3lib_extMgm::addToAllTCAtypes() with the 
"before:field" or "after:field" became quite unhandy for Core-tables 
(everything sitting on palettes) and doesn't produce "nice" results anymore.

To give you an example - adding a new_title field to pages might look like
t3lib_extMgm::addToAllTCAtypes('pages','new_title', '' , 'after:nav_title');
or like:
t3lib_extMgm::addToAllTCAtypes('pages','new_title', '' , 
'--palette--;;title,after:nav_title');

Both don't really work as supposed. They add the field and at least the 
new_title is "close" to the regular "nav_title" but it is not placed on 
the palette - it's just placed before/after the palette where the 
related field is placed. I wasn't able to figure out a way to have nice 
looking results with the API.

Another way to resolve this would be to have own "hardcoded" definitions 
e.g. per "project" or per extension, but this might lead to conflicts 
and also raises the required maintenance time.

So the question is - what is the suggested way to add new fields into 
existing table/tca definitions to get nice results, without raising the 
maintenance level up too much?

Remark 1) I also tried using 
t3lib_extMgm::addFieldsToAllPalettesOfField() but this didn't work for 
me at all.

Remark 2) I had not very much time to really test this - so if anyone is 
able to prove me wrong (means that there is a way to use the existing 
API for this) it would be even better.

Remark 3) Whatever the solution is - it should imho be mentioned in the 
documentation or even the release notes.

Cheers,
Tolleiv
-- 
Tolleiv Nietsch
www.tolleiv.de - www.aoemedia.de
Twitter: http://www.twitter.com/tolleiv


More information about the TYPO3-project-v4 mailing list