SystemWeaver offers Architects the option to define custom ribbon tabs, similar to the dynamic ribbons in MS Office. The concept offers a way to publish and provide access to important functionality or information that might otherwise be overlooked. Custom tabs can be especially useful to new users of a SystemWeaver environment. In the below example, three custom ribbon tabs have been created - "Demos", "Materials" and "Guidelines". Custom Ribbon Tabs can be defined to have a Context or not. Using tab contexts enables you to apply a visual color tab. In the example, the "Demos" ribbon tab was created in the context of a "SystemWeaver" tab, the "Materials" tab in the context of a "Training" context, and the "Guidelines" tab in the context of "Testing". 



Currently, custom tabs can only be derived from the Items ribbon tab, i.e., they can be used within the context of working with items, and not CMS projects (issues). Architects can configure buttons for views and item links on the custom ribbon. The ribbons and ribbon contexts become visible dynamically, depending on the used configuration and the item selected in the item structure tree.


This article describes how to configure a custom ribbon tab. Other articles will cover how to define the various types of menu option buttons which can be added to a custom tab.


Prerequisites


Configuring Ribbon Tabs

Configuration of custom tabs is done on the Features tab in Configure the explorer. Navigate to File > Configure the explorer > Features > Item ribbon tab. If you are starting from scratch, you may find it helpful to copy the example found in View example XML and use it as your starting point.



Click Edit configuration to access the ribbon configuration XML. Enter your configuration there and click Save or OK when done.


Explanation of the Configuration Elements

The <ItemRibbonTabConfig> tag builds the structure of the Item Ribbon Tab configuration. All configuration elements must be included here. 


<Contexts> can include one or more tab contexts. Tab contexts appear above the standard tab row in the swExplorer as shown above. If configured, tab contexts are always visible to users and cannot be hidden. Contexts are optional. 


<Context> includes the configuration of one tab context. The caption attribute defines the name of the tab context that will display as the background for the configured tabs. The color attribute defines the background and text color of the tab context caption. You can enter RGB code like "#CE0F3E" or common Windows colors, like "Blue". Read more in the Color definitions section in the application Help.


<ItemTabs> can include one or more <ItemTab> ribbon tabs. 


<ItemTab> defines one ribbon tab. The caption attribute defines the name of the ribbon tab. Use the optional attribute context to link it to a specific tab context in which the Item tab should appear. If this attribute is omitted, the item tab will be located in the context of the standard Items tab. See Example Configuration Without Using Contexts below.

 

<RibbonGroups> defines the structure of the ribbon into one or more <RibbonGroup> menu groups. 


<RibbonGroup> defines one menu group on the ribbon tab. The caption attribute defines the name of the group seen on the ribbon tab. If you plan to have more than one ribbon group with the same caption, you can use the optional merge attribute to indicate if the definition of a ribbon group should be merged with any existing ribbon group with the same name, including standard groups found on the Items ribbon tab. Possible values are "false" (default) or "true". "false" will clear all of the buttons from the RibbonGroup upon merge. "true" will keep the buttons from the RibbonGroup upon merge, even if there are duplicates. 


Note: Do not name a custom tab "Dashboard" as it will display the content of the existing, hard-coded Dashboard tab in SystemWeaver. Therefore, you will need to use a different name. 


Below are two examples - one that uses Contexts and another that does not. 


Example Configuration With Contexts

<ItemRibbonTabConfig> 

    <Contexts>  
        <Context caption="SystemWeaver" color="Red"/> 
        <Context caption="Training" color="Blue"/> 
        <Context caption="Testing" color="Green"/> 
    </Contexts>  
    
    <ItemTabs>  

        <ItemTab caption="Demos" context="SystemWeaver">
            <RibbonGroups>
                <RibbonGroup caption="Automotive">
                    <OpenItem id="x0400000000000D37" caption=""/>
                </RibbonGroup>
            </RibbonGroups>       
        </ItemTab>       

        <ItemTab caption="Materials" context="Training">
            <RibbonGroups>
                <RibbonGroup caption="General" merge="false">
                    <OpenItem id="x0400000000000DE3" caption=""/>
                    <OpenItem id="x0400000000000DE5" caption=""/>
                    <OpenItem id="x0400000000000DE7" caption=""/>
                </RibbonGroup>     
                <RibbonGroup caption="EE" merge="false">
                    <OpenItem id="x0400000000000DEF" caption="First Level"/>
                </RibbonGroup>
            </RibbonGroups>      
        </ItemTab>     

        <ItemTab caption="Guidelines" context="Testing">
            <RibbonGroups>
                <RibbonGroup caption="Materials" merge="false">
                    <OpenItem id="x0400000000000DE9" caption="1.4"/> 
                    <OpenItem id="x0400000000000DEB" caption="Default"/>  
                    <OpenItem id="x0400000000000DED" caption="TestVerificationTC"/>
                </RibbonGroup>        
            </RibbonGroups>            
        </ItemTab> 
        
    </ItemTabs>  
    
</ItemRibbonTabConfig>

Example Result


Example Configuration Without Contexts

Below is the same configuration as above for "Demos" and "Materials" except that the Contexts have been removed so there are no colored tab contexts above them.

<ItemRibbonTabConfig> 

    <ItemTabs>  

        <ItemTab caption="Demos">
            <RibbonGroups>
                <RibbonGroup caption="Automotive">
                    <OpenItem id="x0400000000000D37" caption=""/>
                </RibbonGroup>
            </RibbonGroups>       
        </ItemTab>       

        <ItemTab caption="Materials">
            <RibbonGroups>
                <RibbonGroup caption="General" merge="false">
                    <OpenItem id="x0400000000000DE3" caption=""/>
                    <OpenItem id="x0400000000000DE5" caption=""/>
                    <OpenItem id="x0400000000000DE7" caption=""/>
                </RibbonGroup>     
                <RibbonGroup caption="EE" merge="false">
                    <OpenItem id="x0400000000000DEF" caption="First Level"/>
                </RibbonGroup>
            </RibbonGroups>      
        </ItemTab>     
        
    </ItemTabs>  
    
</ItemRibbonTabConfig>


Example Result