If we want to customize the ribbon of SharePoint, add, delete, and modify various elements (tab, group, and controls) to it, we must correctly locate our operations. Ribbon is like a target. We can achieve the desired effect only when the operation is directed to the correct position. As the preparation for the next article, we will introduce how to find the correct location.
1. OOB (out of box) ribbons of SharePoint
For the default OOB ribbons of SharePoint, it is defined in the following XML document:
C: \ Program Files \ common files \ microsoft shared \ Web Server Extensions \ 14 \ template \ Global \ XML \ cmdui. xml
In this file, you can find the definitions of each tabs and groups. For example:
Ii. Custom Ribbons
Of course, if you want to operate on related objects in the previously defined ribbons, you cannot rely on the cmdui. xml file to locate the objects correctly. We can use the IE developer bar to achieve our goal. Of course, this method can also determine the first case above, that is, to locate the location of the default ribbons object in Sharepoint.
Use the object selection tool on the IE developer bar to select the object we operate on, and find the object like "<li id =" ribbon. "Such a tag, such a value is the location we need to refer.
Reprinted: http://www.cnblogs.com/wsdj-ITtech/archive/2012/03/05/2279764.html
If we want to customize the ribbon of SharePoint, add, delete, and modify various elements (tab, group, and controls) to it, we must correctly locate our operations. Ribbon is like a target. We can achieve the desired effect only when the operation is directed to the correct position. As the preparation for the next article, we will introduce how to find the correct location.
1. OOB (out of box) ribbons of SharePoint
For the default OOB ribbons of SharePoint, it is defined in the following XML document:
C: \ Program Files \ common files \ microsoft shared \ Web Server Extensions \ 14 \ template \ Global \ XML \ cmdui. xml
In this file, you can find the definitions of each tabs and groups. For example:
Ii. Custom Ribbons
Of course, if you want to operate on related objects in the previously defined ribbons, you cannot rely on the cmdui. xml file to locate the objects correctly. We can use the IE developer bar to achieve our goal. Of course, this method can also determine the first case above, that is, to locate the location of the default ribbons object in Sharepoint.
Use the object selection tool on the IE developer bar to select the object we operate on, and find the object like "<li id =" ribbon. "Such a tag, such a value is the location we need to refer.