Discussion:
[TYPO3] Adding new columns to a palette
Rick Tokke
2007-12-06 16:54:29 UTC
Permalink
I have written an extension to add some extra input fields to a extension.
Using:
1. t3lib_div::loadTCA
2. t3lib_extMgm::addTCAcolumns
3. t3lib_extMgm::addToAllTCAtypes

This all works fine. But by default the new fields are placed on the
bottom of the form.
I want to add them to an existing palette. I can't find how this should
be done in the documentation. By 'reverse engeneering' some other
extensions and the typo3 api I found some possible solutions:

I added the following line after the 3 lines above in the ext_tables.php
$TCA['tt_products']['palettes']['2']['showitem'] =
str_replace('highlight', 'highlight, my_ext_column',
$TCA['tt_products']['palettes']['2']['showitem']);

And i tried changing addToAllTCAtypes by adding
before:highlight,--palette--;;2

t3lib_extMgm::addToAllTCAtypes("tt_products","my_ext_column;;;;1-1-1",
"", "after:highlight,--palette--;;2");

Both have no result the field is still on the bottom of the page.

Any pointers how to solve this issue?

Gr. Rick
Rick Tokke
2007-12-06 17:51:13 UTC
Permalink
Damn i could have saved myself a lot of time.

Seems that i was cleaning the wrong cache. I was cleaning "clean all FE
cache" (red) expecting that this one cleans all cache.
For some stupid reason this doesn't clean everything and it doesn't
include the 'green' cache clean option.

the str_replace function is effective.

Continue reading on narkive:
Loading...