0

I am currently writing the TCA for a custom Domain-Model, representing data-records coming via an interface. I have a child-model being referenced by its parent, and I would love to be able to build the label ("title") for a specific record dynamically based on a value of one of its properties (of the child-record). Does anybody know how to achieve this !? Thanks in advance !

Further info/details :

'childrecords' => array(
        'exclude' => 1,
        'label' => 'Child Record',
        'config' => array(
            'type' => 'inline',
            'foreign_table' => 'childrecord_table',
            'foreign_field' => 'parentid',
            'foreign_label' => '<<<LABELFIELD>>>',
            'maxitems' => 9999,
            'appearance' => array(
                'collapseAll' => 1,
                'levelLinksPosition' => 'top',
                'showSynchronizationLink' => 0,
                'showPossibleLocalizationRecords' => 0,
                'useSortable' => 0,
                'showAllLocalizationLink' => 0
            ),
        ),
    ),

What I want to achieve, is to set the foreign_label (marked with placeholder <<>>) to a string representation for a numeric value available as a child-model-property. This string-description is NOT available as a childproperty directly (I have to set up a static array/table for those).

Oliver
  • 105
  • 13

1 Answers1

1

In short:

Side note, if this concerns LLL values (labels as such, not label field configuration values) you can override those with TypoScript which also supports some dynamic processing: https://wiki.typo3.org/TypoScript_language_additions,_override (old page but I believe this example still works, but not sure if it allows overriding BE labels that are not in the default locallang.xlf file).

Claus Due
  • 4,166
  • 11
  • 23