Ribbon is a new feature introduced from sharepoint2010. It makes the sharepoint2010 operation interface consistent with the office2010 style, enhances the user experience, and makes the sharepoint2010 display style more vivid and compact.
Here, let's take a look at the knowledge about the architecture of SharePoint ribbon.
First, let's look at the general structure of SharePoint ribbon.
From the above structure, we can see that the tab is at the top layer of ribbon. One ribbon can have one or more tabs. Each tab contains one or more groups ), each group contains one or more controls ). in Sharepoint, ribbon is defined as an XML file. We can
% Systemdrive % \ Program Files \ common files \ microsoft shared \ Web Server Extensions \ 14 \ template \ Global \ XML \ cmdui. xml
Find the custom ribbon document (cmdui. XML ). The structure of this document is as follows:
<Commandui xmlns = "http://schemas.microsoft.com/sharepoint/">
<Ribbon id = "">
<Tabs id = "ribbon. Tabs">
<Tab>
<Scaling> </scaling>
<Groups>
<Group>
<Controls> </controls>
</Group>
</Groups>
</TAB>
</Tabs>
<Contextualtabs id = "ribbon. contextualtabs">
<Contextualgroup>
<Tab> </TAB>
</Contextualgroup>
</Contextualtabs>
</Ribbon>
<Templates>
<Ribbontemplates id = "ribbon. templates">
<Grouptemplate> </grouptemplate>
</Ribbontemplates>
</Templates>
</Commandui>
The corresponding elements in the ribbon definition document are described as follows:
When you create a ribbon custom item, the location attribute of the customaction element has the following settings by default. This location attribute tells customaction where to apply the custom item.
Value |
Description |
Commandui. Ribbon |
For the specified registrationid, the custom item appears anywhere. |
Commandui. ribbon. listview |
A custom item is displayed when a list view Web Part exists. |
Commandui. ribbon. editform |
The custom item appears in the editing form. |
Commandui. ribbon. newform |
The custom item appears on the new form. |
Commandui. ribbon. displayform |
The custom items appear on the display form. |
Reprinted: http://www.cnblogs.com/wsdj-ITtech/archive/2012/02/02/2277718.html