I'm trying to change the name and tooltip for the Name property of specific content types.
I'm able to change other types of meta data, for example to hide native properties in the UI, but I can't seem to do it for the Name property.
My code looks like the following:
public void ModifyMetadataForNameProperty(ExtendedMetadata metadata, IEnumerable attributes)
var nameProperty = metadata.Properties.OfType()
prop.OwnerContent is MyContentType &&
prop.PropertyName == "icontent_name");
// Here I have the Name property, populated with the default meta data
if (nameProperty != null)
nameProperty.DisplayName = "Custom name";
nameProperty.ShortDisplayName = "Name";
nameProperty.EditorConfiguration["tooltip"] = "This should be the new tooltip for the Name property for MyContentType instances";
Any clever ideas are much appreciated! :)
You could modify your language files in order to do that I think
<language name="English" id="en">
<caption>My special name</caption>
<help>My really helpful help</help>
Thanks for the reply, Per! That's what I'm doing today, but I wanted to be able to do it with an attribute on the content type. And also I'm just curious if it can be done. :P
Actually, I'm pretty sure that I investigated this a few weeks back and came to the conslusion that changing the DiplayName property on the metadata has no effect. The reason for this is that the language settings for the content type is applied over the metadata in the view, so they way to go is probably to modify this through the language files.
I think I'll look into a custom localization provider instead, that way I can still make it dynamic - for example to use a site setting (content property) as the label.