如何从后台删除 OOTB 属性
How to remove OOTB attributes from Backoffice
我需要从 Backoffice 中删除开箱即用的属性,这些属性在 multipe OOTB 扩展中定义。
我不确定您是想对后台隐藏这些属性,还是想从数据库中完全删除这些属性。
如果你只是想隐藏它们,你可以在items.xml中为这些属性添加以下自定义属性:
<custom-properties>
<property name="hiddenForUI">
<value>Boolean.TRUE</value>
</property>
</custom-properties>
请检查 core-items.xml
以获取一些示例。
或者,您可以导入以下 ImpEx:
INSERT_UPDATE AttributeDescriptor;qualifier[unique=true];enclosingType(code)[unique=true];hiddenForUI
;the-attribute-to-be-hidden;the-itemtype-to-which-the-attribute-belongs;TRUE
如果你想让它们从数据库中完全删除,你可以做以下事情:
- 确定定义它们的扩展名,如果不需要这些扩展名,只需将它们从
localextensions.xml
中删除
- 从各自的 items.xml
中删除这些属性
然后,你需要执行ant clean all updatesystem
。但是,与这些属性对应的列仍将保留在数据库中,因为系统更新不会 remove/drop 来自数据库的任何 table/column(您只能添加新的 tables/columns 和 add/update/remove 数据 使用系统更新)。在大多数情况下,系统初始化也是不可能的。因此,您只有一个选择,即使用 SQL 查询从数据库中删除列。
我需要从 Backoffice 中删除开箱即用的属性,这些属性在 multipe OOTB 扩展中定义。
我不确定您是想对后台隐藏这些属性,还是想从数据库中完全删除这些属性。
如果你只是想隐藏它们,你可以在items.xml中为这些属性添加以下自定义属性:
<custom-properties>
<property name="hiddenForUI">
<value>Boolean.TRUE</value>
</property>
</custom-properties>
请检查 core-items.xml
以获取一些示例。
或者,您可以导入以下 ImpEx:
INSERT_UPDATE AttributeDescriptor;qualifier[unique=true];enclosingType(code)[unique=true];hiddenForUI
;the-attribute-to-be-hidden;the-itemtype-to-which-the-attribute-belongs;TRUE
如果你想让它们从数据库中完全删除,你可以做以下事情:
- 确定定义它们的扩展名,如果不需要这些扩展名,只需将它们从
localextensions.xml
中删除
- 从各自的 items.xml 中删除这些属性
然后,你需要执行ant clean all updatesystem
。但是,与这些属性对应的列仍将保留在数据库中,因为系统更新不会 remove/drop 来自数据库的任何 table/column(您只能添加新的 tables/columns 和 add/update/remove 数据 使用系统更新)。在大多数情况下,系统初始化也是不可能的。因此,您只有一个选择,即使用 SQL 查询从数据库中删除列。