Try our conversational search powered by Generative AI!

How to use ModifyMetadata attributes parameter


Hi! Can somebody explain to me how exactly to use the second parameter from the ModifyMetadata method?

In the documentation the description states: "The custom attributes attached to the model class."

What is the model class?

I have a propertylike this:

[EditorDescriptor(EditorDescriptorType = typeof(LinkItemLiteEditor))]
public virtual LinkItemCollection Links{ get; set; }

And I would like to add some parameters to be used in the ModifyMetadata method. Is it possible?

The goal is to use different linkItem editors for different LinkItemCollection properties.

Edited, Jul 30, 2020 10:59

Hi Ravinda! Thanks for the links. There is nothing in those links that touches anything about the attributes parameter. Do you have any other links that could answer my initial question?

Aug 05, 2020 9:23

If you add attributes to your model, they will show up in the attributes parameter.

A simple example. Adding the attribute [CultureSpecific] will make it turn up in the attributes parameter.

[EditorDescriptor(EditorDescriptorType = typeof(LinkItemLiteEditor))]
public virtual LinkItemCollection Links{ get; set; }

You may create your own custom attributes, to suit your specific needs.

PS. Thanks for mentioning my blog posts Ravindra, even if they did not help :-)

Aug 05, 2020 10:51
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.