Max Garten Max Garten - 1 year ago 125
PHP Question

Typo3/TCA create new tab with fields of another tab inside

I need some help in Typo3/TCA.
Im trying to modify the backend layout of an extension, but cant get it to work.

I try to make the context of "Firma" as a new tab (see image).


I fugured out that the context of "Firma" is defined in tca.php in

as column 'address'. (l. 328 ):

'address' => array(
'label' => $languageFile . ':tx_jobsystem_domain_model_job.address',
'config' => array(
'type' => 'inline',
'foreign_table' => 'tt_address',
#'foreign_field' => 'uid',
'symmetric_field' => 'address',
'appearance' => array(
'collapseAll' => true,
'expandSingle' => true


I did copy it to
at line 116 and used it at l. 272, where the tabs are defined:

'0' => array('showitem' => 'hidden,id, ... visits,--div--;Anzeigendetails,title,job,--div--;Firma,address;;;richtext:nowrap;'),

This is what i get:


Sourcecode: tca.php

also ext_tables.php:

Can anyone help me ?

Answer Source

1) Comments to your basic setup:

The problem is, that you have three things here:

A) Advertisement

B) A job description (connected to the Advertisement)

C) A company (Firma) (connected to the job)

The relations are the following:

---> B)
     ---> C)

So what you want to display C) in A) in a new tab.

Unfortunately, it would be only possible with a userFunc that handles selects the company of the job and returns as a field.

2) Comments to your change:

You have to change your data model like:

---> B)
---> C)

You can not grab a "3rd level inline object" that is connected throught a "2nd level inline object" into the 1st level.

You second code is not working, because you do not have the connection between the company and the advertisement. For that you need to change your ext_tables.sql and domains and so on. But then you lost the connection between the job and the company.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download