简体   繁体   English

隐藏特殊 tt_content 类型中的 sys_file_reference 字段

[英]HIde sys_file_reference field in special tt_content type

I am trying to hide the sys_file_reference.description field in my custom tt_content CE type.我试图在我的自定义 tt_content CE 类型中隐藏 sys_file_reference.description 字段。

Hiding the field for ALL of tt_content (and pages) works like this隐藏所有 tt_content(和页面)的字段就像这样

TCEFORM.sys_file_reference.description.disabled = 1

Hiding a tt_content field for a certain CE type works like this隐藏某个 CE 类型的 tt_content 字段是这样工作的

TCEFORM.tt_content.header.types.mycustomtype.disabled = 1

Hiding the field from the pages sys_file_reference works like this隐藏页面 sys_file_reference 中的字段是这样工作的

TCEFORM.pages.description.types.sys_file_reference.disabled = 1

However, combining the three does nothing for me:但是,将这三者结合起来对我没有任何作用:

TCEFORM.tt_content.description.types.mycustomtype.disabled = 1 TCEFORM.sys_file_reference.description.types.mycustomtype.disabled = 1 TCEFORM.tt_content.description.types.sys_file_reference.types.mycustomtype.disabled = 1 TCEFORM.tt_content.description.types.mycustomtype.disabled = 1 TCEFORM.sys_file_reference.description.types.mycustomtype.disabled = 1 TCEFORM.tt_content.description.types.sys_file_reference.types.mycustomtype.disabled = 1

Is there a way?有办法吗? A TCA solution would be fine, too. TCA 解决方案也可以。

thanks谢谢

TCA Solution:三氯乙酸解决方案:

$GLOBALS['TCA']['tt_content']['types']['mycustomtype']['columnsOverrides']['mycolumn']['config']['overrideChildTca']['columns']['description'] = [
    'config' => [
        'type' => 'passthrough'
    ]
];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM