Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Hide new media-provider in hyperlinks editor


I added some extra media-providers which work properly. The provider and it's file location now also show up in editor windows like the Hyperlink window. How can i prevent it from showing up in the Hyperlink window?

Jan 04, 2016 11:04


In your class, that implements IContentRepositoryDescriptor, can you override LinkableTypes and return null.

public class YourRepositoryDescriptor : MediaRepositoryDescriptor
    private readonly IContentProviderManager ProviderManager;

    public YourRepositoryDescriptor(IContentProviderManager providerManager)
        this.ProviderManager = providerManager;

    public static new string RepositoryKey { get { return YourSettings.ProviderKey; } }

    public override string Key { get { return RepositoryKey; } }

    // Disble in link dialog
    public override IEnumerable<Type> LinkableTypes { get { return null; } }

    public override string Name { get { return YourSettings.ProviderName; } }

    public override string SearchArea { get { return RepositoryKey; } }

    public override IEnumerable<ContentReference> Roots
        get { return new[] { this.ProviderManager.GetProvider(YourSettings.ProviderKey).EntryPoint }; }

    public override IEnumerable<Type> ContainedTypes
        get { return new[] { typeof(YourMediaFolder), typeof(YourMediaItem }; }
Jan 04, 2016 12:13

Excellent! That solved the problem and made my day. Thanks!

Jan 04, 2016 12:24

Please mark the solution as answered :)

Jan 04, 2016 12:26

Sweet! I was just looking for that. Overriding the link EditorDescriptor for link was really messy.

Feb 09, 2016 14:16
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.