Hide menu Last updated: Nov 14 2016
Area: Episerver CMS Applies to versions: 10.1 and higher

Plug-in areas

To enable partner developers to easily extend the Episerver user interface, plug-in areas have been added at common extension points. There is an AMD module for each plug-in area that can be required during initialization; at which time it is possible to add custom commands to the plug-in area. The plug-in areas only accept command prototypes; see the documentation on the command pattern for more information on how to create a command. It is important that only command prototypes are added to the plug-in area since they will be constructed at runtime. When constructed they are set with a model specific to the plug-in area.

Adding a command to a plug-in area

It is recommended that you add your command prototypes to the plug-in area during module initialization. This is done by requiring the plug-in area AMD module and adding the command prototype via the add method. Here is an example of adding the reload children command to the navigation tree:

define([
    'dojo/_base/declare',
    'epi-cms/plugin-area/navigation-tree'
    // Parent class
    'epi/_Module',
    // Commands
    'addon/commands/ReloadChildren'
], function (
    declare,
    navigationTreePluginArea,
    // Parent class
    _Module,
    // Commands
    ReloadChildren
) {

    return declare([_Module], {

        initialize: function () {
            this.inherited(arguments);

            navigationTreePluginArea.add(ReloadChildren);
        }
    });
});

Available plug-in areas

The following is a list of the available plug-in areas, a description of where the plug-in area appears, the AMD module id, and an example of the model that the registered commands will receive.

Navigation tree

Used for plugging into the context menu and component menu of the navigation tree. In Episerver CMS, this is the page tree and in Episerver Commerce, this is the catalog tree.

Module id

epi-cms/plugin-area/navigation-tree

Model

{
    name: "Example Foo",
    contentGuid: "84645b22-6343-442a-bec1-bc5559ae0c34",
    contentLink: "163",
    parentLink: "5",
    ownerContentLink: null,
    permanentLink: "/link/84645b226343442abec1bc5559ae0c34.aspx",
    publicUrl: "/example-foo/",
    previewUrl: "/EPiServer/CMS/Content/example-foo,,163/?epieditmode=False",
    hasTemplate: true,
    hasChildren: false,
    status: 4,
    providerCapabilityMask: 1023,
    accessMask: 63,
    contentTypeID: 23,
    contentTypeName: "Standard Page",
    created: "2016-04-22T06:21:13Z",
    createdBy: "John Smith",
    changed: "2016-04-22T06:21:21.25Z",
    changedBy: "John Smith",
    deletedBy: "",
    deleted: null,
    saved: "2016-04-22T06:21:21.25Z",
    isDeleted: false,
    isStartPage: false,
    isWastebasket: false,
    currentLanguageBranch: {
        name: "English",
        languageId: "en",
        isMasterLanguage: true,
        urlSegment: null,
        accessMask: 0
    },
    typeIdentifier: "alloytemplates.models.pages.standardpage"
}

Comments