Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Joshua Walsh 30 posts 151 karma points
    Jun 23, 2015 @ 00:06
    Joshua Walsh
    0

    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:

    1. Iterate through all PublishedEntities
    2. Iterate through all Properties on those PublishedEntities
    3. Check if the Property uses my Property Editor
    4. 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.

  • Joshua Walsh 30 posts 151 karma points
    Jun 23, 2015 @ 00:13
    Joshua Walsh
    0

    Never mind, I just discovered PropertyType.PropertyEditorAlias. PropertyType.DataTypeId has an IntelliSense hint that showed me this.

Please Sign in or register to post replies

Write your reply to:

Draft