[英]Hide tt_content elements in backend based on field value
<?php
我有一個名為theme_section_columns的自定義CType,它的子記錄也來自tt_content表。 使用字段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字段中具有值的內容元素?
listmod擴展名可以滿足我的要求: http ://typo3.org/extensions/repository/view/listmod
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.