1

I want to add a custom action in the Pages of tab which comes when I edit the page. The publishing page is stored in the Pages Library.

To made thing for single list(i.e. Pages Library) I have created a custom action for the content type.

My declarative part is

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction Id="ContentTypeRibbonCustomization" 
                RegistrationId="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF39009A2F8A780CB442EC9899AD3D4A097C86"
                RegistrationType="ContentType" 
                Location="CommandUI.Ribbon.DisplayForm" Sequence="95" Title="Ribbon Customization for a Content Type">
    <CommandUIExtension xmlns="http://schemas.microsoft.com/sharepoint/">
      <!-- Define the (UI) button to be used for this custom action -->
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.ListForm.Display.Manage.Controls._children">
          <Button Id="{B511A716-54FF-4EAE-9CBE-EA02B51B626E}"
          Command="{4E2F5DC0-FE2C-4466-BB2D-3ED0D1917763}"
          Image32by32="~site/_layouts/Images/BingSearch/bing32.png"
          Image16by16="~site/_layouts/Images/BingSearch/bing16.png"
          Sequence="0"
          LabelText="Bing It!"
          Description="Search Title on Bing"
          TemplateAlias="o1"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <!-- Define the action expected on the button click -->
        <CommandUIHandler Command="{4E2F5DC0-FE2C-4466-BB2D-3ED0D1917763}" CommandAction="javascript:alert('hello');" />
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
</Elements>

I am getting the output in the View form like:

enter image description here

I want to insert the same here..

Page tab

I searched over internet for adding the custom action in Page tab but couldn't find it.

What should I do?

  • Can you try to set location attribute to Ribbon.List.Manage.Controls._children and see if it works. – Nadeem Yousuf Jan 21 '14 at 11:26
  • Thanks for responding sir, I made the following changes: <CustomAction Location="CommandUI.Ribbon".../> & <CommandUIDefinition Location="Ribbon.List.Manage.Controls._children"> but not working – users1100 Jan 21 '14 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.