Extending tabs in a dialog
Add a tab to a dialog, such as a Component dialog or a Schema dialog, to populate it with controls and/or information.
Procedure
- Open the configuration file of your custom Editor in a plain-text or XML editor.
- In the
extensionssection, locate theext:tabpagessection. Inside this section, create or find an<ext:add>element. - For each new dialog tab you want to create, insert an
ext:extensionelement that has the following form:<ext:extension assignid="MyDialogTabID" name="My Dialog Tab" insertbefore="InfoTab"> <ext:control>~/Extensions/Tabs/MyDialogTab.ascx</ext:control> <ext:pagetype /> <ext:apply> <ext:view name="*"> <ext:control id="MasterTabControl"/> </ext:view> </ext:apply> </ext:extension>where MyDialogTabID identifies the new tab, My Dialog Tab is the display label of the tab, and the value of insertbefore indicates to the left of which tab the new tab will be positioned. The
ext:viewelement specifies where to add this new tab. In this example, the new tab is added to all views that contain a control calledMasterTabControl. - If you intend to place static data only on this new dialog tab, your tab is now finished.
- Alternatively, if you intend to place controls and/or dynamic data on it, continue by creating a JavaScript class that inherits from Tridion.Controls.DeckPage and that defines your custom implementation of the new dialog tab.
- At the end of the file, call
Tridion.Controls.Deck.registerPageTypeto register this new type of dialog tab under a specific name. - Save this file as a .js file and add it to your Visual Studio solution.
- Create a new
cfg:groupelement for this JavaScript file in your custom Editor's configuration file, and give it a dependency on the group that represents the set of tabs you want to add it to. - Add a
ContentResourcesattribute to the server-side class for the ASCX control, and set it to the name of the new resource group. - In the
ext:extensionelement that defines the new dialog tab, setext:pagetypeto the name under which you registered your new dialog tab in the JavaScript file. - Save and close your configuration file and restart the Content Manager Explorer Web application.