This content is archived. See latest version here

Last updated: Jul 09 2014


The following example shows how to create a component that plugs in to the assets panel of the CMS home view:

using EPiServer.Shell.ViewComposition;
using EPiServer.Shell.Web;

namespace CodeSamples
        //Auto-plugs in the component to the assets panel of cms (See EPiServer.Shell.PlugInArea
        //in the EPiServer.UI assembly for Dashboard and CMS constants)
        PlugInAreas = "/episerver/cms/assets",
        Categories = "cms",
        WidgetType = "alloy.components.CustomComponent",
        //Define language path to translate Title/Description.
        //LanguagePath = "/customtranslations/components/customcomponent";
        Title = "My custom component",
        Description = "A custom component that shows information about the current content item.")]
    public class CustomComponent { }

And the following is the corresponding JavaScript widget:

// Dojo
// Dijit

], function (
// Dojo

// Dijit
) {
    return declare([_WidgetBase, _TemplatedMixin, _ContentContextMixin], {
        // summary: A simple widget that listens to changes to the 
        // current content item and puts the name in a div.

        templateString: '<div>\
                            <div data-dojo-attach-point="contentName"></div>\

        contextChanged: function (context, callerData) {

            // the context changed, probably because we navigated or published something

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