Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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!

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Well, it looks like all the examples out there are wrong, at least in this particular case. The TemplateAlias attribute needs to be c1, not o1.

Hope this helps someone.

share|improve this answer
    
hello, hitdrumhard.. I am facing same issue for content type but I am not getting custom action placed in the Publish tab... –  users1100 Jan 21 at 11:25

I haven't tried with the RegistrationId but take a look at my blog post for putting it on the edit page

share|improve this answer
    
Your page seems to be down - would you mind posting your solution here? –  Rafał Saltarski Jun 6 at 10:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.