Click or drag to resize
AlchemyExtension Groups

Extension Groups are a special extension that allows you to extend any existing Resource Group by adding another resource group to it. This will allow your custom resource group to automatically be loaded anywhere the target Resource Group is used. You can use this extension to add extra JavaScript or Stylesheets to an existing view or even customize an existing script.

An extension group usually includes static files and a resource group.

This topic contains the following sections:

Creating a Resource Group

As an extenion group will inject files into an existing resource group, you'll first need to create a resource group that contains the files that you wish to extend your target with. See the Resource Group guide for more information on creating resource groups.

Creating an Extension Group

Once you have your resource group, the next step is to create an extension group. You can do this by creating a class that inherits from Alchemy4Tridion.Plugins.GUI.ConfigurationExtensionGroup. Within the constructor of your class, you can add one or more targets of what you want to extend via the AddExtension method. When using this method, you pass in the Type of your resource group in the Type Parameter, and the target resource group you are extending as a string for the first argument.

C#
public class PublicationPanelSearchExtensionGroup : ExtensionGroup
{
    public PublicationPanelSearchExtensionGroup()
    {
        AddExtension<YourResourceGroup>("Tridion.Web.UI.Editors.CME.Views.Popups.Link");
    }
}

The above example will create an extension using YourResourceGroup to extend the existing resource group "Tridion.Web.UI.Editors.CME.Views.Popups.Link" (the hyperlink popup).

Note Note

In a traditional GUI Extension, for extenion groups you would create a resource group config element, an extension group config element, and a <resourceextension /> config element (at the bottom in the <resourceextensions /> element). For Alchemy4Tridion, the resourcextension is automatically created with the extensiongroup.

See Also