为特殊插件类型更改 TYPO3 TCEFORM header_layout 和 header
Change TYPO3 TCEFORM header_layout and header for a special plugin type
我知道可以为每个 Ctype 更改 header_layout 和 header 的配置。例如,对于文本媒体,它将是:
TCEFORM.tt_content.header_layout.types.textmedia.disabled = 1
此处记录:https://docs.typo3.org/typo3cms/TSconfigReference/PageTsconfig/TceForm.html
但是如果我想为一个特殊的插件配置 header_layout 怎么办?插件的 Ctype 总是类型列表。
list_types也可以区分吗?像这样?
TCEFORM.tt_content.header_layout.types.news_pi1.disabled = 1
我认为这是不可能的,因为您只能将一个字段配置为"record type"字段,即tt_content中的"CType"。
https://docs.typo3.org/typo3cms/TCAReference/Ctrl/Index.html#type
您只能使用 TCEFORM.tt_content.header_layout.types.list.disabled = 1
为所有插件禁用此字段。
所以让这个只对一个插件有效,你必须为它创建一个新的 CType 或者你可能覆盖整个 header_layout 字段,使它成为 "user" 的一种类型,所以你可以在 PHP 函数中自行设置字段可见性:
https://docs.typo3.org/typo3cms/TCAReference/ColumnsConfig/Type/User.html
我知道可以为每个 Ctype 更改 header_layout 和 header 的配置。例如,对于文本媒体,它将是:
TCEFORM.tt_content.header_layout.types.textmedia.disabled = 1
此处记录:https://docs.typo3.org/typo3cms/TSconfigReference/PageTsconfig/TceForm.html
但是如果我想为一个特殊的插件配置 header_layout 怎么办?插件的 Ctype 总是类型列表。 list_types也可以区分吗?像这样?
TCEFORM.tt_content.header_layout.types.news_pi1.disabled = 1
我认为这是不可能的,因为您只能将一个字段配置为"record type"字段,即tt_content中的"CType"。 https://docs.typo3.org/typo3cms/TCAReference/Ctrl/Index.html#type
您只能使用 TCEFORM.tt_content.header_layout.types.list.disabled = 1
为所有插件禁用此字段。
所以让这个只对一个插件有效,你必须为它创建一个新的 CType 或者你可能覆盖整个 header_layout 字段,使它成为 "user" 的一种类型,所以你可以在 PHP 函数中自行设置字段可见性: https://docs.typo3.org/typo3cms/TCAReference/ColumnsConfig/Type/User.html