Documentation Center

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

  1. From the Add-ons screen in Content Manager Explorer, download the Add-on package (ZIP file) that contains your GUI Editor extension.
  2. From the ZIP file you downloaded, extract the GUI Editor's configuration file and open it for editing.
  3. In the extensions section, locate the ext:ribbontoolbars section. Inside this section, create or find an <ext:add> element.
  4. 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:extension element with its pageid and assignid set to the same value.
  5. For each group you want to create on a Ribbon toolbar tab, insert a new ext:extension element 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 (omit insertbefore to 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:view refers 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 EditorView and replace TOOLBAR_NAME with MainToolbar.
    Content Manager Explorer Ribbon toolbar
    To add the button to the Ribbon of the Content Manager Explorer user interface, replace VIEW_NAME with DashboardView and replace TOOLBAR_NAME with DashboardToolbar.
  6. 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:control to this ASCX control.
  7. Save and close your configuration file and restart the Content Manager Explorer Web application.
  8. 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).
  9. From the Add-ons screen in Content Manager Explorer, upload the updated Add-on package (ZIP file). It replaces your old Add-on package.