This question is for anyone who wants to add a custom button to the Ribbon under the WikiPage or PublishTab tabs. The methods out there for adding a button that is associated with a list or library or file type do not seem to work for this particular scenario. The Button simply doesn't appear.
Here is the XML I am trying recently:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="Ribbon.PublishTab.Publishing.CheckLinkedPageItems"
Location="CommandUI.Ribbon"
RegistrationType="List"
RegistrationId="850"
Sequence="40"
Title="Move Documents">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.PublishTab.Publishing.Controls._children">
<Button
Id="Ribbon.PublishTab.Publishing.CheckLinkedPageItemsButton"
Alt="Check Linked Page Assets"
Sequence="40"
Command="CheckLinkedPageItems"
Image32by32="/_layouts/images/ita/CheckLinked32.png"
Image16by16="/_layouts/images/ita/CheckLinked16.png"
LabelText="Check Assets"
TemplateAlias="o1"
ToolTipTitle="Check Linked Page Assets"
ToolTipDescription="Checks each image, document and page linked to from this page and verified if the asset is both working (not a broken link) and published. You may also use that page to publish all unpublished assets at once."
/>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="CheckLinkedPageItems" CommandAction="javascript:alert('button clicked!);" />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
</Elements>
I've tried several different combinations of RegistrationId and RegistrationType with no avail.
So far I've tried:
- List / 101
- List / 850 (id for Pages Library)
- FileType / aspx
- ContentType / 0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF39 (ContentTypeId for 'page' content type)
Has anyone actually gotten this to work? Thanks!