如何從另一個表中獲取選定的記錄(使用 TCA 組欄位)

TCA 欄位配置示例,你可以從表中選擇記錄

'my_topfeatures' => array(
        'label' => 'Select Topfeatures',
        'config' => array(
            'type' => 'group',
            'internal_type' => 'db',
            'size' => '4',
            'allowed' => 'tx_topfeatures_items',
            'wizards' => array(
                'suggest' => array(
                    'type' => 'suggest',
                    'default' => array(
                        'searchWholePhrase' => 1
                    ),
                    'pages' => array(
                        'searchCondition' => 'doktype = 1'
                    )
                )
            )
        )
    ) 

Typoscript 設定:

tt_content.yourctype {
    templateName = FE_Topfeatures
    dataProcessing {
        10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
        10 {
            table = tx_topfeatures_items 
            pidInList = root
            recursive = 1
            where = deleted = 0 AND hidden = 0
            where.inval = 1
            uidInList = ###selectedtopfeatures###
            orderBy = sorting
            as = tx_topfeatures_items
            markers {
                selectedtopfeatures.field = my_topfeatures
                selectedtopfeatures.commaSeparatedList = 1
            }

            dataProcessing {
                10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
                10 {
                    references.fieldName = downloadfile
                    as = downloadfiles
                }
            }
        }
    }
}