[Typo3-dev] Configuring tables/fields for listing in Web > Page
Andrew Henson
andy at elaptics.co.uk
Sun May 2 18:45:32 CEST 2004
Poking around the changelog I noticed that Kasper has added an API for
adding extra tables to be listed in the Web > Page module. I have looked
at the source and found the changes in class.tx_cms_layout and
db_layout. I have got it working with one of my extensions as follows
but I would like someone with a bit more Typo3 knowledge to tell me if I
am doing this in the right way.
Firstly, I couldn't find any functions to add the tables and field lists
in, can anyone tell me if I have missed it? If there isn't is this
something that could/should be added into the t3lib_extMgm class?
Secondly, what I did to get it working was to add the following into my
extensions ext_tables.php file. Is this the way I should be adding data
to this array? I suspect not as it presumeably won't take into account
other peoples extensions which may do the same thing for their
extension. If not, can anyone tell me a better method?
##not sure if this is the correct way to use the addTables api but it
seems to generally work
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['cms']['db_layout']['addTables']
= Array (
'my_extension_table_name' => Array (
'0' => Array (
'fList' => 'fieldname1,fieldname2,fieldname3',
'icon'=>'0',
),
),
'my_extension_table_name2' => Array (
'0' => Array (
'fList' => 'field1,field2',
'icon' => '1',
),
),
);
Thanks,
Andy
More information about the TYPO3-dev
mailing list