[英]Change tt_content's TCA for a subtype?
Is it possible, for a specific plugin (eg newspage_pi1
), to configure its TCA, ie its back-end form display?对于特定插件(例如newspage_pi1
),是否可以配置其 TCA,即其后端表单显示? Just for that specific plugin, because when changing tt_content
's TCA for the list
type (ie plugins) like this:仅针对该特定插件,因为在更改tt_content
的list
类型(即插件)的 TCA 时,如下所示:
$GLOBALS['TCA']['tt_content']['types']["list"] = [
'showitem' => "
(tabs..palettes..columns..etc...)"];
It changes it for all plugins, and I only want to change it for the newspage_pi1
list_type
.它为所有插件更改它,我只想为newspage_pi1
list_type
更改它。
Yes, I know that I can use 'subtype_value_field' => 'list_type'
and then subtypes_excludelist
and subtypes_addlist
to add or remove fields for specific plugins.是的,我知道我可以使用'subtype_value_field' => 'list_type'
然后使用subtypes_excludelist
和subtypes_addlist
来添加或删除特定插件的字段。 But this is not nearly as powerful as setting showitem
directly, since it allows to define new tabs, palettes, position the fields how you want to, etc.但这并不像直接设置showitem
那样强大,因为它允许定义新的选项卡、调色板、position 字段,等等。
I also know about FlexForms , but these only control the Plugin Options
field, not all the other ones.我也知道FlexForms ,但这些只控制Plugin Options
字段,而不是所有其他字段。
Is there a way to change the showitem
for a specific plugin?有没有办法更改showitem
插件的显示项?
Thanks a lot in advance!提前非常感谢!
Frankly said, what you actually want is not a subtype but another type, since it needs to change fields other than the usual plugin / pi_flexform configurations.坦率地说,您真正想要的不是子类型,而是另一种类型,因为它需要更改通常的 plugin / pi_flexform 配置以外的字段。
So instead of adding that subtype as a plugin you should add it as another CType to get the full power of showitem
.因此,不要将该子类型添加为插件,您应该将其添加为另一个 CType 以获得showitem
的全部功能。
Basically, this is how we add any kind of plugin too, since it makes more sense to have real database fields at hand instead of faking them with XML data structures.基本上,这也是我们添加任何类型插件的方式,因为手头有真实的数据库字段而不是用 XML 数据结构伪造它们更有意义。
As mentioned in the description here https://api.typo3.org/master/class_t_y_p_o3_1_1_c_m_s_1_1_core_1_1_utility_1_1_extension_management_utility.html#ab4f6c66990aca246eac5390a76f0c83c As mentioned in the description here https://api.typo3.org/master/class_t_y_p_o3_1_1_c_m_s_1_1_core_1_1_utility_1_1_extension_management_utility.html#ab4f6c66990aca246eac5390a76f0c83c
... - or more generally use this function to add an entry to any selectorbox/radio-button set in the FormEngine ... - 或更一般地使用此 function 将条目添加到 FormEngine 中设置的任何选择器框/单选按钮
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.