【发布时间】:2015-08-13 14:37:23
【问题描述】:
<?php
我有一个名为 theme_section_columns 的自定义 CType,它也有来自 tt_content 表的子记录。 关系 parent -> child 是使用字段 tx_theme_tt_content 创建的。 这是配置:
$tca = array(
.....
'types' => array(
'theme_section_columns' => array(
'showitem' => '
--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general,
--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.headers;header,
tx_theme_tt_content,
--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access,
--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.visibility;visibility,
--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.access;access,
--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended,
'
),
.....
'columns' => array(
'tx_theme_tt_content' => array(
'label' => 'LLL:EXT:theme/Resources/Private/Language/Backend.xlf:content_element',
'config' => array(
'type' => 'inline',
'foreign_table' => 'tt_content',
'foreign_field' => 'tx_theme_tt_content',
'appearance' => array(
'useSortable' => TRUE,
'showSynchronizationLink' => TRUE,
'showAllLocalizationLink' => TRUE,
'showPossibleLocalizationRecords' => TRUE,
'showRemovedLocalizationRecords' => FALSE,
'expandSingle' => TRUE,
'enabledControls' => array(
'localize' => TRUE,
),
),
'behaviour' => array(
'localizationMode' => 'select',
'mode' => 'select',
'localizeChildrenAtParentLocalization' => TRUE,
),
),
),
),
),
);
一切都按预期进行,除了一件事。在后端列表模块中显示所有 tt_content 元素,包括 theme_section_columns 的子元素。 有没有办法在列表模块中隐藏在 tx_theme_tt_content 字段中有值的内容元素?
【问题讨论】:
标签: php configuration typo3 children