Get all properties of a content node that use a certain property editor
Hi,
I'm making a custom property editor and I need to do some work on it every time the content type is published.
In my OnPublishing event I am trying to achieve this:
Iterate through all PublishedEntities
Iterate through all Properties on those PublishedEntities
Check if the Property uses my Property Editor
Do work
Step 3 is proving difficult. I thought the best way to do this would be to get a list of all Data Types that use my Property Editor and then compare the Data Type of the Property to that list and see if it's there. I'm having trouble making that list though.
I'm confused as to the difference between DataTypes and DataTypeDefinitions. Apparently DataTypes have an Id which represents the DataType and also a Guid which is unique to the Property Editor. Unfortunately I don't know how to find this Guid given the name of my Property Editor. There are also DataTypeDefinitions, how do they relate to everything?
Thanks,
Josh
EDIT: Adding to my confusion, DataType, DataTypeDefinition and IDataType are all reported as obsolete by IntelliSense.
Get all properties of a content node that use a certain property editor
Hi,
I'm making a custom property editor and I need to do some work on it every time the content type is published.
In my OnPublishing event I am trying to achieve this:
Step 3 is proving difficult. I thought the best way to do this would be to get a list of all Data Types that use my Property Editor and then compare the Data Type of the Property to that list and see if it's there. I'm having trouble making that list though.
I'm confused as to the difference between DataTypes and DataTypeDefinitions. Apparently DataTypes have an Id which represents the DataType and also a Guid which is unique to the Property Editor. Unfortunately I don't know how to find this Guid given the name of my Property Editor. There are also DataTypeDefinitions, how do they relate to everything?
Thanks,
Josh
EDIT: Adding to my confusion, DataType, DataTypeDefinition and IDataType are all reported as obsolete by IntelliSense.
Never mind, I just discovered PropertyType.PropertyEditorAlias. PropertyType.DataTypeId has an IntelliSense hint that showed me this.
is working on a reply...