A frequent question I get during my “How to develop for the SharePoint Ribbon” session is:
How can I identify and existing ribbon control or group ID?
This is useful when you wish to override, hide a control, or insert new controls into an existing group / new groups into an existing tab.
So, this task is pretty simple once you know this trick:
First, open a page and make your ribbon control visible:
Second, use IE developer tool bar to select the ribbon button you want:
Climb up the HTML to the span container, the span ID will have the ribbon control ID:
In my case, for the wiki page “email a link” here is what we get:
So, the control ID will be:
And there you go!