November Happy Hour will be moved to Thursday December 5th.

How to make NAME only editable in master/default language

Vote:
 
  1. In CMS, the property for Name - The client would like to have the "Name" property under Branding Settings to be only editable in en-US (default language), When Name is changed in en-US, all other languages will have the change propegated.

How can I do it?

#174182
Jan 20, 2017 17:53
Vote:
 

Not sure what are you refering to but if I am correct in understanding you want to change the behaviour based on your custom logic, this can be done by implementing EditorDescriptor and overriding the ModifyMetadata method. 
Regards
/K

#174194
Jan 20, 2017 18:35
Vote:
 

Well, I see the name property in PageData class. Currently you're allowed to change it per language. In my case, it should only be editable in en-US.

Can you please point me in the right direction?

#174199
Jan 20, 2017 20:13
Vote:
 

This is pseudo code, it should work

public class CustomMetaDataExtender : IMetadataExtender
    {
        public void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes)
        {
// loop through metaData.Properties and if its Name and langue is not en-us then 
foreach (ExtendedMetadata property in metadata.Properties)
        {
            if (property.PropertyName == "Name" and current language is not en-us)
{
property.disabled = trrue
}
}

        }
    }
#174210
Jan 21, 2017 0:34
* 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.