Adding a new group to a Ribbon toolbar tab
Add a group (a named set of controls) to a tab in the Ribbon toolbar as a container for your custom controls, or to organize controls differently.
Procedure
- From the Add-ons screen in Content Manager Explorer, download the Add-on package (ZIP file) that contains your GUI Editor extension.
- From the ZIP file you downloaded, extract the GUI Editor's configuration file and open it for editing.
- In the
extensionssection, locate theext:ribbontoolbarssection. Inside this section, create or find an<ext:add>element. - Find out the ID of the Ribbon toolbar tab that you want to create this group in: either a built-in Ribbon toolbar tab or one of the custom tabs you added, listed as an
ext:extensionelement with itspageidandassignidset to the same value. - For each group you want to create on a Ribbon toolbar tab, insert a new
ext:extensionelement inside the<ext:add>element and set it up as follows:<ext:extension pageid="RibbonTabID" name="My Group" assignid="MyGroupID" insertbefore="AnotherGroupID"> <ext:group/> <ext:apply> <ext:view name="VIEW_NAME"> <ext:control id="TOOLBAR_NAME" /> </ext:view> </ext:apply> </ext:extension>where RibbonTabID identifies the Ribbon toolbar tab you want to add this group to, My Group is the display name of the group you want to create, MyGroupID is the internal idenfitier for your group, and AnotherGroupID refers to the Ribbon toolbar tab to the left of which you want to insert your tab (omitinsertbeforeto make your Group the rightmost Group). If you want to add a Group to an existing Ribbon tab, you can find out its ID by examining the HTML of a Web page that displays the tab (the IDs of Ribbon tabs end in the word 'Page').ext:viewrefers to the specific Ribbon toolbar and view that you add this new Group to:- Web site Ribbon toolbar
-
To add the button to the Ribbon that end users see when they edit a Web page, replace VIEW_NAME with
EditorViewand replace TOOLBAR_NAME withMainToolbar. - Content Manager Explorer Ribbon toolbar
-
To add the button to the Ribbon of the Content Manager Explorer user interface, replace VIEW_NAME with
DashboardViewand replace TOOLBAR_NAME withDashboardToolbar.
- By default, a new Group can contain controls similar to the ones in other Groups. To make completely new and custom controls in your Group, create an ASCX control that inherits from the class Tridion.Web.UI.Controls.TridionUserControl, and implement your custom control. Refer to the GUI Extension API reference documentation for details. If you do this, set the contents of
ext:controlto this ASCX control. - Save and close your configuration file and restart the Content Manager Explorer Web application.
- Save and close the configuration file and update it in the ZIP file. You may want to increase the build number in the filename of the ZIP file, or even the version number of the Add-on (which you must also then change in the manifest file).
- From the Add-ons screen in Content Manager Explorer, upload the updated Add-on package (ZIP file). It replaces your old Add-on package.