Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Custom Action not Binding to custom content type

$
0
0

I'm trying to create a custom action to replace the save button in the ribbon for publishing pages that have a specific content type. For some reason it isn't showing up on the publishing pages with the specified content type. Here is the xml:

<CustomAction Id="30c31720-e337-451c-a7ac-a68d09f64a37.RibbonCustomAction2"
                RegistrationType="ContentType"
      RegistrationId="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D0095AC9C03A12F40F9A023F6278B841536"
                Location="CommandUI.Ribbon"
                Sequence="1006"
                Title="Invoke &apos;RibbonCustomAction1&apos; action">
    <CommandUIExtension>
      <!-- 
      Update the UI definitions below with the controls and the command actions
      that you want to enable for the custom action.
      -->
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.WikiPageTab.EditAndCheckout.Controls._children">
          <Button Id="Ribbon.ListItem.Actions.RibbonCustomAction1Button"
                  Alt="Save"
                  Sequence="1"
                  Command="Invoke_RibbonCustomAction1ButtonRequest"
                  LabelText="Save"
                  TemplateAlias="o1"
                  Image32by32="_layouts/15/1033/images/formatmap32x32.png?rev=38"
                  Image32by32Top="-171"
                  Image32by32Left="-409"
                  Image16by16="_layouts/15/1033/images/formatmap16x16.png?rev=38" />
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler Command="Invoke_RibbonCustomAction1ButtonRequest"
                          CommandAction="~remoteAppUrl/CustomActionTarget.aspx?{StandardTokens}&amp;SPListItemId={SelectedItemId}&amp;SPListId={SelectedListId}"/>
      </CommandUIHandlers>
    </CommandUIExtension >
  </CustomAction>

However, if I remove the RegistrationType and RegistrationID the custom action does show up but it is on all pages. any ideas?


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>