【发布时间】:2018-02-27 13:34:57
【问题描述】:
我目前正在为自定义域模型编写 TCA,表示来自接口的数据记录。我有一个被其父级引用的子模型,我希望能够根据其属性之一(子记录)的值动态地为特定记录构建标签(“标题”)。有谁知道如何实现这一目标!?提前致谢!
更多信息/细节:
'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
),
),
),
我想要实现的是将foreign_label(用占位符>标记)设置为一个字符串表示形式,用于作为子模型属性可用的数值。此字符串描述 NOT 可直接作为子属性使用(我必须为它们设置一个静态数组/表)。
【问题讨论】:
标签: dynamic label typo3 domain-model