--- a/src/pyams_content/shared/common/interfaces/types.py Wed Oct 03 19:24:39 2018 +0200
+++ b/src/pyams_content/shared/common/interfaces/types.py Fri Oct 05 15:00:26 2018 +0200
@@ -130,6 +130,8 @@
def get_data_type(self):
"""Get associated data type"""
+ field_names = Attribute("Selected data type field names")
+
class IWfTypedSharedContentPortalContext(IWfTypedSharedContent, IBaseContentPortalContext):
"""Shared content with portal support"""
--- a/src/pyams_content/shared/common/types.py Wed Oct 03 19:24:39 2018 +0200
+++ b/src/pyams_content/shared/common/types.py Fri Oct 05 15:00:26 2018 +0200
@@ -133,6 +133,12 @@
manager = ITypedDataManager(tool)
return manager.get(self.data_type)
+ @property
+ def field_names(self):
+ data_type = self.get_data_type()
+ if data_type is not None:
+ return data_type.field_names
+
@subscriber(IObjectAddedEvent, context_selector=IWfTypedSharedContent)
def handle_added_typed_shared_content(event):