Try our conversational search powered by Generative AI!

Hide Media from Optimizely's Link Editor


Our client uses their own DAM system and therefore wants to remove/hide the field Media from a Link editor where one adds Page/language/Media/Title/Email/External link/Remaining/Url

Has anyone being able to do it? 

Nov 16, 2022 14:42

Try using an editor descriptor, you can OverrideDefault with your own widget or look at other options available to remove a specific input

    TargetType = typeof(string),
    UIHint = "HyperLink",
    EditorDescriptorBehavior = EditorDescriptorBehavior.OverrideDefault)
    internal class CustomLinkEditorDescriptor : EditorDescriptor
        public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes)
            base.ModifyMetadata(metadata, attributes);

            if (!metadata.EditorConfiguration.ContainsKey(("providers")))

            var providers = (metadata.EditorConfiguration["providers"] as IEnumerable<object>).ToList();

            metadata.EditorConfiguration["providers"] = providers;

This gave me the following view 

Edited, Nov 16, 2022 17:24

Thanks Minesh, but this doesn't help in hiding/removing only media  

Dec 01, 2022 9:42
* 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.