This content is archived. See latest version here

Last updated: Jul 09 2014


The global search in the top menu of EPiServer (OnlineCenter) features search functionality by aggregating results from several search providers. Any type of content can be searched and each provider reports results based on a specific category, for example, pages, blog posts or files.

For EPiServer CMS three search providers are included:

  • MenuSearchProvider searches among the menu items.
  • PagesSearchProvider searches for CMS pages (including page content)
  • FilesSearchProvider searches for CMS documents

Using the [SearchProvider] attribute

To add a custom search provider, you need to configure your assembly as a shell module (see documentation about shell modules). The next step is to implement the ISearchProvider interface and decorate the class with the [SearchProvider] attribute.


  • Area is used to prioritize search providers in the current “area”. This means that search providers for the CMS area will be placed first when performing a search from the edit and admin interfaces.
  • Category is used as display name in the user interface.


  • Search returns an enumeration of hits for the given query.

Note for future compatibility: The [SearchProvider] attribute extends a library that will be changed in a version after EPiServer CMS 6. This means that any code using this attribute will need to be recompiled.


    public class FilesSearchProvider : ISearchProvider
    /// <summary>
    /// Area that the provider mapps to, used for spotlight searching
    /// </summary>
    public string Area
        get { return "CMS"; }

    /// <summary>
                /// The category that the provider returns hits in
                /// </summary>
                public string Category
        get { return "Files"; }

    public IEnumerable<SearchResult> Search(Query query)
        return ...

Do you have feedback on this documentation? Send an email to For development-related questions and discussions, refer to our Forums on